83% rubsum

Code Review | RubSum

WordPress plugin RubSum scored83%from 54 tests.

About plugin

  • Plugin page: rubsum
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-5.2.4
  • WordPress version: 6.3.1
  • First release: Jun 15, 2019
  • Latest release: Oct 24, 2019
  • Number of updates: 8
  • Update frequency: every 16.4 days
  • Top authors: rubelbdp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /449 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.58MB] [CPU: ▼1.78ms] Passed 4 tests

An overview of server-side resources used by RubSum
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3938.79 ▼0.41
Dashboard /wp-admin3.96 ▲0.6648.85 ▼2.90
Posts /wp-admin/edit.php3.98 ▲0.6352.56 ▲1.28
Add New Post /wp-admin/post-new.php6.56 ▲0.6786.71 ▼5.10
Media Library /wp-admin/upload.php3.88 ▲0.6640.18 ▲5.62
Add New Employee /wp-admin/post-new.php?post_type=rs_employees_info4.3355.40
All Employees /wp-admin/edit.php?post_type=rs_employees_info3.9339.13
speciality /wp-admin/edit-tags.php?taxonomy=employee-speciality&post_type=rs_employees_info3.8836.22

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 383 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by RubSum
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲22415.79 ▲1.4216.06 ▲14.2738.43 ▼9.17
Dashboard /wp-admin2,248 ▲665.90 ▲1.01110.79 ▲4.2738.32 ▼4.37
Posts /wp-admin/edit.php2,131 ▲392.08 ▲0.0241.46 ▼1.3738.81 ▲0.67
Add New Post /wp-admin/post-new.php1,547 ▲523.33 ▲5.07668.20 ▲35.0152.29 ▼6.89
Media Library /wp-admin/upload.php1,433 ▲484.24 ▲0.0094.31 ▼14.9542.69 ▼2.17
Add New Employee /wp-admin/post-new.php?post_type=rs_employees_info2,3337.24165.5372.11
All Employees /wp-admin/edit.php?post_type=rs_employees_info1,1121.9932.2330.77
speciality /wp-admin/edit-tags.php?taxonomy=employee-speciality&post_type=rs_employees_info1,3022.2227.7527.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 38× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rubsum/metabox/metabox-config.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/rubsum/metabox/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/rubsum/metabox/includes/types/CMB2_Type_Colorpicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/rubsum/metabox/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/rubsum/metabox/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/rubsum/metabox/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/rubsum/metabox/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/rubsum/metabox/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/rubsum/metabox/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/rubsum/metabox/includes/types/CMB2_Type_Select_Timezone.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === rubsum === )
Please take inspiration from this readme.txt

rubsum/rubsum.php 85% from 13 tests

The main PHP file in "RubSum" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected57,410 lines of code in 224 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP562,1116,0887,076
CSS151,1701,1574,672
SVG30123,927
JavaScript103435083,871
JSON2003,529
Sass16300251,379
Markdown22150633

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.46
▷ Minimum class complexity1.00
▷ Maximum class complexity185.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes67
▷ Abstract classes811.94%
▷ Concrete classes5988.06%
▷ Final classes00.00%
Methods524
▷ Static methods8616.41%
▷ Public methods43382.63%
▷ Protected methods8816.79%
▷ Private methods30.57%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
metabox/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
metabox/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
metabox/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
metabox/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
metabox/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%