84% wp-uploads-stats

Code Review | WP Uploads Stats

WordPress plugin WP Uploads Stats scored 84% from 54 tests.

About plugin

  • Plugin page: wp-uploads-stats
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5
  • WordPress version: 6.3.1
  • First release: Jan 20, 2015
  • Latest release: Apr 11, 2016
  • Number of updates: 12
  • Update frequency: every 37.3 days
  • Top authors: tyxla (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 2,183 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.52ms] Passed 4 tests

A check of server-side resources used by WP Uploads Stats
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.34 ▼3.87
Dashboard /wp-admin3.50 ▲0.2044.93 ▼2.29
Posts /wp-admin/edit.php3.55 ▲0.2045.89 ▼1.71
Add New Post /wp-admin/post-new.php6.02 ▲0.1487.17 ▼2.21
Media Library /wp-admin/upload.php3.36 ▲0.1335.13 ▲1.83
Uploads Stats /wp-admin/upload.php?page=wpus-uploads-stats3.3637.95

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Uploads Stats
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.68 ▲0.301.71 ▼0.3240.58 ▼8.64
Dashboard /wp-admin2,207 ▲165.80 ▲0.8899.16 ▼6.5538.97 ▼5.36
Posts /wp-admin/edit.php2,093 ▲71.97 ▼0.0234.57 ▼1.5834.52 ▼3.39
Add New Post /wp-admin/post-new.php1,536 ▼623.11 ▲4.67654.20 ▲52.9680.09 ▲24.51
Media Library /wp-admin/upload.php1,395 ▲44.21 ▼0.0695.38 ▼2.0943.62 ▼4.20
Uploads Stats /wp-admin/upload.php?page=wpus-uploads-stats1,3352.9255.5935.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 44× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_data() on null in wp-content/plugins/wp-uploads-stats/templates/module-attachment-by-year.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_data() on null in wp-content/plugins/wp-uploads-stats/templates/module-attachment-type.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Uploads_Stats_Module_Base' not found in wp-content/plugins/wp-uploads-stats/modules/attachment-by-year/module.php:5
    • > PHP Notice
      Undefined variable: wp_uploads_module in wp-content/plugins/wp-uploads-stats/templates/module-size-by-year-chart.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_data() on null in wp-content/plugins/wp-uploads-stats/templates/module-overview.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Uploads_Stats_Module_Size_By_Year' not found in wp-content/plugins/wp-uploads-stats/modules/size-by-year-chart/module.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Uploads_Stats_Module_Base' not found in wp-content/plugins/wp-uploads-stats/modules/overview/module.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Uploads_Stats_Module_File_Type' not found in wp-content/plugins/wp-uploads-stats/modules/file-type-chart/module.php:6
    • > PHP Notice
      Undefined variable: wp_uploads_module in wp-content/plugins/wp-uploads-stats/templates/module-attachment-by-year.php on line 2
    • > PHP Notice
      Undefined variable: wp_uploads_module in wp-content/plugins/wp-uploads-stats/templates/module-attachment-by-year-chart.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: stats, statistics, upload, attachment, file...

wp-uploads-stats/wp-uploads-stats.php Passed 13 tests

"WP Uploads Stats" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
Provides you with detailed statistics about your WordPress media uploads and attachments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,503 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP34252751978
SVG100250
JavaScript33038114
PO File1333790
Markdown118037
CSS24534

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.57
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods74
▷ Static methods34.05%
▷ Public methods6993.24%
▷ Protected methods45.41%
▷ Private methods11.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin