83% cubicfusion-admin-enhancer

Code Review | cubicFUSION Admin Enhancer

WordPress plugin cubicFUSION Admin Enhancer scored83%from 54 tests.

About plugin

  • Plugin page: cubicfusion-admin...
  • Plugin version: 0.2.6.1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 12, 2020
  • Latest release: Aug 13, 2023
  • Number of updates: 38
  • Update frequency: every 31.3 days
  • Top authors: portalzine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,035 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.43MB] [CPU: ▲5.43ms] Passed 4 tests

This is a short check of server-side resources used by cubicFUSION Admin Enhancer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2740.10 ▼0.18
Dashboard /wp-admin3.82 ▲0.5162.10 ▲9.63
Posts /wp-admin/edit.php3.86 ▲0.5056.91 ▲9.09
Add New Post /wp-admin/post-new.php6.45 ▲0.5691.46 ▲3.16
Media Library /wp-admin/upload.php3.67 ▲0.4451.42 ▲13.98
Admin Toolbar /wp-admin/admin.php?page=cf_plugins_admin_toolbar4.0455.48
Shortcodes /wp-admin/admin.php?page=cf_plugins_shortcodes_widgets3.8446.05
Dashboard Templates /wp-admin/edit.php?post_type=cf_dashboard3.7239.95
CF Admin Enhancer /wp-admin/admin.php?page=cf_plugins_shortcodes_options3.7341.16
Dashboard Gutenberg /wp-admin/admin.php?page=cf_plugins_dashboard_gutenberg3.7937.08

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 466 new files
Database: no new tables, 8 new options
New WordPress options
cubicfusion_admin_toolbar_nodes
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
cf_plugins_shortcodes_cache_widgets

Browser metrics Passed 4 tests

cubicFUSION Admin Enhancer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.62 ▲0.351.73 ▲0.1741.96 ▼0.57
Dashboard /wp-admin2,263 ▲865.72 ▲0.1591.30 ▼1.5738.05 ▼6.43
Posts /wp-admin/edit.php2,166 ▲692.06 ▲0.0941.97 ▲5.5935.84 ▼2.51
Add New Post /wp-admin/post-new.php1,750 ▲22422.37 ▼0.76638.20 ▼99.0529.36 ▼35.49
Media Library /wp-admin/upload.php1,469 ▲694.44 ▲0.25104.09 ▲1.0845.88 ▼2.10
Admin Toolbar /wp-admin/admin.php?page=cf_plugins_admin_toolbar2,1095.45111.8792.09
Shortcodes /wp-admin/admin.php?page=cf_plugins_shortcodes_widgets1,3341.7529.6442.49
Dashboard Templates /wp-admin/edit.php?post_type=cf_dashboard1,3322.1534.9939.69
CF Admin Enhancer /wp-admin/admin.php?page=cf_plugins_shortcodes_options1,0872.2826.3135.64
Dashboard Gutenberg /wp-admin/admin.php?page=cf_plugins_dashboard_gutenberg1,4424.2070.4443.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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 7 options in the database
    • cubicfusion_admin_toolbar_nodes
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 fix the following items
  • 49× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Opis\\Closure\\ISecurityProvider' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/closure/src/SecurityProvider.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\ode' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/scssphp/src/Node/Number.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/cmb2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/scssphp/src/Formatter/Debug.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/cubicfusion-admin-enhancer/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
You can take inspiration from this readme.txt

cubicfusion-admin-enhancer/cubicfusion.php 92% from 13 tests

The primary PHP file in "cubicFUSION Admin Enhancer" version 0.2.6.1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cubicfusion-admin-enhancer.php" instead of "cubicfusion.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected68,572 lines of code in 306 files:
LanguageFilesBlank linesComment linesLines of code
PO File12214,32818,51532,408
PHP1065,78010,24820,060
JSON4006,697
CSS194041,2415,190
Sass21332311,559
JavaScript163886241,537
Markdown842301,111
XML100010

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,209)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 209)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity36.95
▷ Minimum class complexity1.00
▷ Maximum class complexity1,209.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity209.00
Code structure
Namespaces10
Interfaces1
Traits0
Classes112
▷ Abstract classes119.82%
▷ Concrete classes10190.18%
▷ Final classes00.00%
Methods1,114
▷ Static methods14613.11%
▷ Public methods64758.08%
▷ Protected methods45140.48%
▷ Private methods161.44%
Functions64
▷ Named functions3960.94%
▷ Anonymous functions2539.06%
Constants87
▷ Global constants1112.64%
▷ Class constants7687.36%
▷ Public constants76100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
inc/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
inc/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
inc/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
inc/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%