78% apcu-manager

Code Review | APCu Manager

WordPress plugin APCu Manager scored78%from 54 tests.

About plugin

  • Plugin page: apcu-manager
  • Plugin version: 3.7.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Jan 10, 2020
  • Latest release: Nov 23, 2023
  • Number of updates: 31
  • Update frequency: every 45.6 days
  • Top authors: PierreLannoy (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

6,000+ active /54,909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.92MB] [CPU: ▲4.18ms] Passed 4 tests

A check of server-side resources used by APCu Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8248.91 ▲7.46
Dashboard /wp-admin4.28 ▲0.9354.40 ▼12.60
Posts /wp-admin/edit.php4.33 ▲0.9760.40 ▲11.87
Add New Post /wp-admin/post-new.php6.88 ▲0.9993.83 ▲9.98
Media Library /wp-admin/upload.php4.20 ▲0.9747.70 ▲11.94
Analytics /wp-admin/admin.php?page=perfopsone-analytics4.1842.71
Control Center /wp-admin/admin.php?page=perfopsone-dashboard4.2239.18
Tools /wp-admin/admin.php?page=perfopsone-tools4.1742.60
APCu /wp-admin/admin.php?page=apcm-viewer4.8148.36
APCu /wp-admin/admin.php?page=apcm-tools4.4842.77
APCu Manager /wp-admin/admin.php?page=apcm-settings4.2742.77

Server storage [IO: ▲2.60MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 569 new files
Database: 2 new tables, 6 new options
New tables
wp_apcm_details
wp_apcm_statistics
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by APCu Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11614.71 ▲0.371.88 ▲0.0942.26 ▼1.93
Dashboard /wp-admin2,261 ▲815.63 ▼0.0493.81 ▼0.2339.01 ▼4.23
Posts /wp-admin/edit.php2,163 ▲632.03 ▲0.0240.81 ▲3.8035.98 ▲2.99
Add New Post /wp-admin/post-new.php1,562 ▲3223.36 ▲0.21654.34 ▲59.5358.00 ▲0.79
Media Library /wp-admin/upload.php1,464 ▲644.19 ▲0.0499.71 ▲3.1041.41 ▼1.26
Analytics /wp-admin/admin.php?page=perfopsone-analytics9172.0125.7728.64
Control Center /wp-admin/admin.php?page=perfopsone-dashboard1,1072.1828.8336.22
Tools /wp-admin/admin.php?page=perfopsone-tools9382.0026.4925.55
APCu /wp-admin/admin.php?page=apcm-viewer3,2335.17194.9681.12
APCu /wp-admin/admin.php?page=apcm-tools1,1342.1127.6034.13
APCu Manager /wp-admin/admin.php?page=apcm-settings1,0542.0127.3532.35

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 did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/apcu-manager/public/partials/apcu-manager-public-display.php
  • 113× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'APCMKint\\Parser\\Plugin' not found in wp-content/plugins/apcu-manager/includes/libraries/kint/src/Parser/TracePlugin.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'APCMKint\\Renderer\\Text\\Plugin' not found in wp-content/plugins/apcu-manager/includes/libraries/kint/src/Renderer/Text/DepthLimitPlugin.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'APCMKint\\Kint' not found in wp-content/plugins/apcu-manager/includes/libraries/kint/init.php:48
    • > PHP Fatal error
      Trait 'cebe\\markdownparser\\block\\CodeTrait' not found in wp-content/plugins/apcu-manager/includes/libraries/markdown/block/FencedCodeTrait.php on line 15
    • > PHP Fatal error
      Uncaught Error: Interface 'APCMKint\\Renderer\\Rich\\PluginInterface' not found in wp-content/plugins/apcu-manager/includes/libraries/kint/src/Renderer/Rich/Plugin.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'APCMKint\\Renderer\\Text\\Plugin' not found in wp-content/plugins/apcu-manager/includes/libraries/kint/src/Renderer/Text/TracePlugin.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'APCMKint\\Parser\\Plugin' not found in wp-content/plugins/apcu-manager/includes/libraries/kint/src/Parser/ThrowablePlugin.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function APCuManager\\Plugin\\Feature\\add_shortcode() in wp-content/plugins/apcu-manager/includes/features/class-wpcli.php:438
    • > PHP Warning
      require_once(ABSPATHwp-load.php): failed to open stream: No such file or directory in wp-content/plugins/apcu-manager/perfopsone/class-installer.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'APCMKint\\Renderer\\Rich\\Plugin' not found in wp-content/plugins/apcu-manager/includes/libraries/kint/src/Renderer/Rich/ColorPlugin.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: monitor, apcu, cache, w3tc, object cache

apcu-manager/apcu-manager.php Passed 13 tests

This is the main PHP file of "APCu Manager" version 3.7.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
70 characters long description:
APCu statistics and management right in the WordPress admin dashboard.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected44,857 lines of code in 537 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript201,9222,30520,496
PHP2043,23010,81117,741
SVG285014,251
CSS1827021,819
Markdown81940497
JSON20053

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 134)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity17.95
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity134.00
Code structure
Namespaces22
Interfaces16
Traits15
Classes153
▷ Abstract classes63.92%
▷ Concrete classes14796.08%
▷ Final classes10.68%
Methods1,101
▷ Static methods28425.79%
▷ Public methods80372.93%
▷ Protected methods14513.17%
▷ Private methods15313.90%
Functions46
▷ Named functions3473.91%
▷ Anonymous functions1226.09%
Constants113
▷ Global constants7162.83%
▷ Class constants4237.17%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin