67% iphods-itunes-top-products-rss-widget

Code Review | iPhods iTunes Top Products Widget

WordPress plugin iPhods iTunes Top Products Widget scored67%from 54 tests.

About plugin

  • Plugin page: iphods-itunes-top...
  • Plugin version: 8.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.6.5
  • WordPress version: 6.3.1
  • First release: Aug 13, 2013
  • Latest release: Aug 18, 2013
  • Number of updates: 43
  • Update frequency: every 0.1 days
  • Top authors: bradmkjr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,385 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.55MB] [CPU: ▲512.51ms] 50% from 4 tests

An overview of server-side resources used by iPhods iTunes Top Products Widget
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 577.97ms on /wp-admin/options-general.php?page=iphods-settings)
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 512.51ms on /wp-admin/options-general.php?page=iphods-settings)
PageMemory (MB)CPU Time (ms)
Home /2.45 ▼1.02571.29 ▲525.66
Dashboard /wp-admin2.46 ▼0.85583.98 ▲535.89
Posts /wp-admin/edit.php2.46 ▼0.90556.93 ▲508.11
Add New Post /wp-admin/post-new.php2.46 ▼3.43574.41 ▲480.39
Media Library /wp-admin/upload.php2.46 ▼0.77580.62 ▲539.49
iPhods Settings /wp-admin/options-general.php?page=iphods-settings2.46577.97

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_iphods_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for iPhods iTunes Top Products Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲5214.81 ▲0.381.76 ▼0.3736.02 ▼8.11
Dashboard /wp-admin2,213 ▲254.86 ▼0.0198.82 ▼8.3139.91 ▼4.17
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0333.92 ▼1.8832.43 ▼2.22
Add New Post /wp-admin/post-new.php1,544 ▲1120.69 ▼2.52639.40 ▼43.9959.41 ▼2.33
Media Library /wp-admin/upload.php1,389 ▲14.17 ▼0.0394.20 ▼22.0146.72 ▼1.10
iPhods Settings /wp-admin/options-general.php?page=iphods-settings9072.0221.9828.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/iphods-itunes-top-products-rss-widget/iphods_top_widget.php+25
    Trying to get property 'feed_country' of non-object
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_iphods_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=iphods-settings
    • > Notice in wp-content/plugins/iphods-itunes-top-products-rss-widget/iphods_top_widget.php+25
    Trying to get property 'feed_country' of non-object
    • > GET request to /wp-admin/options-general.php?page=iphods-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=iphods-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/iphods-itunes-top-products-rss-widget/iphods_top_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/iphods-itunes-top-products-rss-widget/iphods_top_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/iphods-itunes-top-products-rss-widget/iphods_settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/iphods-itunes-top-products-rss-widget/iphods_shortcode.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === iphods-itunes-top-products-rss-widget === )
Please take inspiration from this readme.txt

iphods-itunes-top-products-rss-widget/iphods.php 85% from 13 tests

"iPhods iTunes Top Products Widget" version 8.17's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("iphods-itunes-top-products-rss-widget.php" instead of "iphods.php")
  • Description: The description should be shorter than 140 characters (currently 385 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin635 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4167106518
CSS129592
JavaScript27925

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity15.75
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods3093.75%
▷ Protected methods00.00%
▷ Private methods26.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/button.png1.93KB0.98KB▼ 49.12%