10% itunes-charts

Code Review | iTunes Charts

WordPress plugin iTunes Charts scored 10% from 54 tests.

About plugin

  • Plugin page: itunes-charts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2015
  • Latest release: Apr 21, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: wodco (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 2,339 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/itunes-charts/itunes.php+349
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.69ms] Passed 4 tests

A check of server-side resources used by iTunes Charts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.28 ▼40.33
Dashboard /wp-admin2.05 ▼1.265.50 ▼38.28
Posts /wp-admin/edit.php2.05 ▼1.315.36 ▼44.62
Add New Post /wp-admin/post-new.php2.05 ▼3.846.58 ▼91.51
Media Library /wp-admin/upload.php2.05 ▼1.185.13 ▼28.43

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_itunes_plugin
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by iTunes Charts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.60 ▼0.785.08 ▲3.0838.76 ▼1.70
Dashboard /wp-admin2,206 ▲575.84 ▲0.21100.49 ▼0.0839.22 ▼1.23
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.1634.42 ▼8.3333.16 ▼1.82
Add New Post /wp-admin/post-new.php1,514 ▼1917.69 ▼5.54663.81 ▲25.1563.25 ▲11.53
Media Library /wp-admin/upload.php1,382 ▼94.22 ▲0.0196.57 ▼1.1841.14 ▼1.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/itunes-charts/itunes.php+349
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_itunes_plugin
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/itunes-charts/itunes.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === itunes-charts === )
You can take inspiration from this readme.txt

itunes-charts/itunes.php 92% from 13 tests

The entry point to "iTunes Charts" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("itunes-charts.php" instead of "itunes.php")

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 plugin534 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1138330
CSS100135
JavaScript1131269

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.01
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/img/stop.png0.96KB0.87KB▼ 9.34%
lib/img/play.png0.99KB0.92KB▼ 6.61%
lib/img/stop@2x.png1.86KB1.53KB▼ 18.02%
lib/img/play@2x.png2.11KB1.61KB▼ 23.77%