10% sell-services

Code Review | Sell Services

WordPress plugin Sell Services scored 10% from 54 tests.

About plugin

  • Plugin page: sell-services
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 5.8.1
  • First release: Jun 8, 2018
  • Latest release: Jun 8, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: blackbellapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 687 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
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.82MB] [CPU: ▼188.90ms] Passed 4 tests

Server-side resources used by Sell Services
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼1.035.84 ▼32.44
Dashboard /wp-admin1.82 ▼1.235.78 ▼36.81
Posts /wp-admin/edit.php1.82 ▼1.285.88 ▼42.05
Add New Post /wp-admin/post-new.php1.82 ▼3.615.58 ▼644.31
Media Library /wp-admin/upload.php1.82 ▼1.185.97 ▼23.86
Sell Services Plugin /wp-admin/options-general.php?page=sell-services1.834.80

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Sell Services: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.96 ▼0.058.60 ▼1.1247.09 ▼0.42
Dashboard /wp-admin2,996 ▲625.88 ▼0.07136.62 ▼6.72103.74 ▼13.57
Posts /wp-admin/edit.php2,771 ▲352.85 ▲0.0165.68 ▲1.9793.15 ▼4.91
Add New Post /wp-admin/post-new.php1,692 ▲19418.87 ▲0.06366.97 ▼13.44100.33 ▼7.58
Media Library /wp-admin/upload.php1,840 ▲305.03 ▼0.01145.15 ▼1.10118.28 ▼0.51
Sell Services Plugin /wp-admin/options-general.php?page=sell-services1,1632.2758.27105.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=sell-services
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

SRP 50% 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
Please fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/sell-services/admin/parts/welcome.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sell-services/admin/parts/about.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sell-services/admin/parts/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sell-services/admin/parts/tabs.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sell-services/admin/settings-page.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (18 tag instead of maximum 10)
You can take inspiration from this readme.txt

sell-services/sell-services.php Passed 13 tests

Analyzing the main PHP file in "Sell Services" version 1.0.2
117 characters long description:
Blackbell simplifies selling, marketing and operations. It is your happy place to manage every area of your business.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin304 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP685152233
CSS18036
JavaScript2131635

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png11.30KB7.01KB▼ 37.99%