78% awesome-service

Code Review | Awesome Service Box

WordPress plugin Awesome Service Box scored78%from 54 tests.

About plugin

  • Plugin page: awesome-service
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2019
  • Latest release: Jun 7, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: amzad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.62MB] [CPU: ▲2.85ms] Passed 4 tests

This is a short check of server-side resources used by Awesome Service Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3940.96 ▼0.21
Dashboard /wp-admin4.01 ▲0.7151.98 ▲3.73
Posts /wp-admin/edit.php4.03 ▲0.6747.61 ▲3.20
Add New Post /wp-admin/post-new.php6.60 ▲0.7294.32 ▲4.69
Media Library /wp-admin/upload.php3.93 ▲0.7040.75 ▲6.93
Add Service /wp-admin/post-new.php?post_type=awesome_service_4.3453.53
Awesome Service Option /wp-admin/edit.php?post_type=awesome_service_&page=service3.8438.67
Awesome Service /wp-admin/edit.php?post_type=awesome_service_3.9836.41

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 121 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Awesome Service Box
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲24614.09 ▼0.294.90 ▲2.9137.97 ▼9.28
Dashboard /wp-admin2,267 ▲795.20 ▲0.26115.02 ▲5.5442.08 ▲1.33
Posts /wp-admin/edit.php2,152 ▲632.42 ▲0.4038.05 ▲0.9632.70 ▼3.27
Add New Post /wp-admin/post-new.php1,561 ▲3323.21 ▲4.92618.60 ▼33.9435.18 ▼19.64
Media Library /wp-admin/upload.php1,446 ▲554.50 ▲0.3195.04 ▼3.7742.26 ▲1.07
Add Service /wp-admin/post-new.php?post_type=awesome_service_2,4518.32195.4266.39
Awesome Service Option /wp-admin/edit.php?post_type=awesome_service_&page=service1,4072.7951.8634.07
Awesome Service /wp-admin/edit.php?post_type=awesome_service_1,1162.3436.0427.56

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=awesome_service_&page=service
    • > Notice in wp-content/plugins/awesome-service/admin/awesome-option.php+54
    Undefined variable: awesome_service_options

SRP 50% 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
The following issues need your attention
  • 40× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-service/admin/awesome-option.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_hookup' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/awesome-service/admin/cmb2/includes/types/CMB2_Type_Select.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

awesome-service/awesome-service.php 85% from 13 tests

The main PHP script in "Awesome Service Box" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin9,012 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP572,0815,9556,771
Sass17305251,439
JavaScript560170303
CSS114229286
SVG103213

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.56
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes66
▷ Abstract classes812.12%
▷ Concrete classes5887.88%
▷ Final classes00.00%
Methods519
▷ Static methods8616.57%
▷ Public methods42882.47%
▷ Protected methods8816.96%
▷ Private methods30.58%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.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
17 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
admin/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
admin/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
img/banner-772x250.png11.77KB4.76KB▼ 59.58%
admin/cmb2/images/ico-delete.png0.70KB0.72KB0.00%