10% wpms-admin-reports

Code Review | WPMS Admin Reports

WordPress plugin WPMS Admin Reports scored10%from 54 tests.

About plugin

  • Plugin page: wpms-admin-reports
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2013
  • Latest release: Jan 23, 2015
  • Number of updates: 26
  • Update frequency: every 16.0 days
  • Top authors: Cleanshooter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,472 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/wpms-admin-reports/wpms_admin_reports.php+37
    require_once(wp-content/mu-plugins/wpms_admin_reports/mcmvc.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.24ms] Passed 4 tests

This is a short check of server-side resources used by WPMS Admin Reports
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.44 ▼3.19
Dashboard /wp-admin3.31 ▼0.0454.54 ▼8.93
Posts /wp-admin/edit.php3.36 ▲0.0047.10 ▼11.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.44 ▼4.84
Media Library /wp-admin/upload.php3.23 ▲0.0035.45 ▼2.77

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

WPMS Admin Reports: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.79 ▲0.411.76 ▲0.1647.26 ▲6.75
Dashboard /wp-admin2,206 ▲185.85 ▼0.06106.06 ▼41.3239.47 ▼19.22
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0235.57 ▼14.6332.29 ▼7.22
Add New Post /wp-admin/post-new.php1,547 ▲3318.46 ▼5.00640.29 ▲6.2866.54 ▲12.12
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0296.23 ▼6.8146.99 ▲1.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/controllers/site_report.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/controllers/menu.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/controllers/help_tabs.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/models/dashboard.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/controllers/dashboard.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/controllers/user_report.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/views/user_report.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/views/plugin_report.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/mcmvc.php
    • > /wp-content/plugins/wpms-admin-reports/wpms_admin_reports/app/views/site_report.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpms-admin-reports/wpms_admin_reports/dispatcher.php:7
    • > PHP Fatal error
      Uncaught Exception: This plugin requires PHP version 5.3.1 or higher and WP version 3.1 or higher in wp-content/plugins/wpms-admin-reports/wpms_admin_reports.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: multisite, wpms reports, admin reports, network, reports

wpms-admin-reports/wpms_admin_reports.php 92% from 13 tests

"WPMS Admin Reports" version 1.2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpms-admin-reports.php" instead of "wpms_admin_reports.php")

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
There were no executable files found in this plugin3,164 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP24278772,083
CSS63450697
JavaScript96116368
SVG10016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity12.57
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods77
▷ Static methods00.00%
▷ Public methods7496.10%
▷ Protected methods00.00%
▷ Private methods33.90%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wpms_admin_reports/assets/css/start/images/ui-bg_glass_75_79c9ec_1x400.png0.34KB0.16KB▼ 52.87%
wpms_admin_reports/assets/css/start/images/ui-bg_glass_45_0078ae_1x400.png0.34KB0.16KB▼ 52.60%
wpms_admin_reports/assets/css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png0.29KB0.10KB▼ 65.41%
wpms_admin_reports/assets/css/start/images/ui-bg_flat_75_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
wpms_admin_reports/assets/css/start/images/ui-bg_flat_55_999999_40x100.png0.21KB0.08KB▼ 60.45%