83% credit-tracker

Code Review | Credit Tracker

WordPress plugin Credit Tracker scored83%from 54 tests.

About plugin

  • Plugin page: credit-tracker
  • Plugin version: 1.1.17
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2013
  • Latest release: Oct 1, 2020
  • Number of updates: 91
  • Update frequency: every 28.2 days
  • Top authors: labs64 (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active /20,684 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▼3.28ms] Passed 4 tests

An overview of server-side resources used by Credit Tracker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3843.15 ▼1.97
Dashboard /wp-admin3.69 ▲0.3847.60 ▼2.48
Posts /wp-admin/edit.php3.74 ▲0.3851.88 ▲4.09
Add New Post /wp-admin/post-new.php6.21 ▲0.3288.94 ▼12.77
Media Library /wp-admin/upload.php3.55 ▲0.3240.12 ▲4.55
Credit Tracker /wp-admin/options-general.php?page=credit-tracker3.5143.77

Server storage [IO: ▲1.22MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
CREDITTRACKER_OPTIONS
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_credit_tracker_table_widget

Browser metrics Passed 4 tests

Checking browser requirements for Credit Tracker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲11613.60 ▼0.795.78 ▲3.8541.95 ▼3.06
Dashboard /wp-admin2,210 ▲194.83 ▼0.99107.33 ▲5.0538.54 ▼4.38
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0641.10 ▲1.5334.54 ▼2.76
Add New Post /wp-admin/post-new.php1,537 ▼022.92 ▲4.28682.04 ▲33.1567.17 ▲11.04
Media Library /wp-admin/upload.php1,396 ▲114.30 ▲0.0796.13 ▼8.3441.63 ▼1.62
Credit Tracker /wp-admin/options-general.php?page=credit-tracker1,1011.7225.7036.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_credit_tracker_table_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CTParser' not found in wp-content/plugins/credit-tracker/php/parser/istockphoto.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CTParser' not found in wp-content/plugins/credit-tracker/php/parser/shutterstock.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/credit-tracker/options.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CTParser' not found in wp-content/plugins/credit-tracker/php/parser/freeimages.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CTParser' not found in wp-content/plugins/credit-tracker/php/parser/fotolia.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CTParser' not found in wp-content/plugins/credit-tracker/php/parser/pixelio.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/credit-tracker/credit-tracker-widgets.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CTParser' not found in wp-content/plugins/credit-tracker/php/parser/unsplash.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CTParser' not found in wp-content/plugins/credit-tracker/php/parser/adobestock.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CTParser' not found in wp-content/plugins/credit-tracker/php/parser/flickr.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Adjust Credit Tracker Settings from within the WordPress CMS), #2 (Credit Tracker Integration within the WordPress Media Library), #3 (Media Library Overview with Credit Tracker Details), #4 (Example layouts and styles for the Credit Tracker Table when integrated within the main site via ShortCode), #5 (Custom Image Caption Shortcode to reflect Credit Information)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === credit-tracker === )
The official readme.txt is a good inspiration

credit-tracker/credit-tracker.php Passed 13 tests

"Credit Tracker" version 1.1.17's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
A simple way to show credits for the images used on your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,814 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP214327171,903
PO File4170234469
CSS2539214
Bourne Shell13030106
JavaScript26447
Markdown123042
YAML10028
INI1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.07
▷ Minimum class complexity2.00
▷ Maximum class complexity24.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods50
▷ Static methods612.00%
▷ Public methods2958.00%
▷ Protected methods1428.00%
▷ Private methods714.00%
Functions65
▷ Named functions65100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants417.39%
▷ Class constants1982.61%
▷ Public constants19100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 1.05MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png97.36KB32.99KB▼ 66.12%
assets/icon-256x256.png2.16KB1.47KB▼ 31.86%
screenshot-5.png129.10KB43.67KB▼ 66.18%
screenshot-2.png97.79KB31.49KB▼ 67.80%
screenshot-3.png76.74KB26.73KB▼ 65.16%