68% service-box-with-slider

Code Review | Service Box Slider

WordPress plugin Service Box Slider scored68%from 54 tests.

About plugin

  • Plugin page: service-box-with-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 5, 2021
  • Latest release: Aug 25, 2023
  • Number of updates: 32
  • Update frequency: every 23.3 days
  • Top authors: wpmart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /4,580 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.97MB] [CPU: ▲1.07ms] Passed 4 tests

An overview of server-side resources used by Service Box Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.42 ▲0.9646.62 ▲0.88
Dashboard /wp-admin4.28 ▲0.9852.60 ▼1.14
Posts /wp-admin/edit.php4.40 ▲1.0454.67 ▲3.68
Add New Post /wp-admin/post-new.php6.87 ▲0.9898.45 ▲0.84
Media Library /wp-admin/upload.php4.21 ▲0.9842.90 ▲6.61
Template 21-30 /wp-admin/admin.php?page=sbs-6310-template-21-304.3639.22
Privacy Policy /wp-admin/admin.php?page=sbs-6310-privacy-policy4.1850.80
Manage Items /wp-admin/admin.php?page=sbs-6310-service-box-manage-items4.5147.99
All Service Box /wp-admin/admin.php?page=sbs-6310-service-box4.2139.02
WpMart Plugins /wp-admin/admin.php?page=sbs-6310-wpmart-plugins4.2038.70
Settings /wp-admin/admin.php?page=sbs-6310-service-box-setting4.2144.47
Template 41-50 /wp-admin/admin.php?page=sbs-6310-template-41-504.3536.97
Template 11-20 /wp-admin/admin.php?page=sbs-6310-template-11-204.3748.87
Import/Export Plugin /wp-admin/admin.php?page=sbs-6310-service-box-import-export4.2051.44
License /wp-admin/admin.php?page=sbs-6310-service-box-license4.2037.45

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 272 new files
Database: 2 new tables, 7 new options
New tables
wp_sbs_6310_style
wp_sbs_6310_item
New WordPress options
widget_theysaidso_widget
sbs_6310_version_info
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Service Box Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲9514.62 ▲0.431.69 ▼0.0445.68 ▼3.08
Dashboard /wp-admin2,262 ▲825.71 ▲0.04115.88 ▲15.2641.66 ▼5.24
Posts /wp-admin/edit.php2,170 ▲701.99 ▼0.0440.71 ▲4.3437.59 ▲1.48
Add New Post /wp-admin/post-new.php1,578 ▲5023.20 ▲0.08607.01 ▼94.9755.16 ▲0.53
Media Library /wp-admin/upload.php1,470 ▲674.20 ▲0.06103.15 ▼10.9647.02 ▼0.70
Template 21-30 /wp-admin/admin.php?page=sbs-6310-template-21-304,52635.641,015.58233.07
Privacy Policy /wp-admin/admin.php?page=sbs-6310-privacy-policy9562.1133.4136.16
Manage Items /wp-admin/admin.php?page=sbs-6310-service-box-manage-items6,0714.2264.4742.72
All Service Box /wp-admin/admin.php?page=sbs-6310-service-box1,0032.8133.4837.51
WpMart Plugins /wp-admin/admin.php?page=sbs-6310-wpmart-plugins1,0892.8137.6838.79
Settings /wp-admin/admin.php?page=sbs-6310-service-box-setting1,2003.0141.2033.47
Template 41-50 /wp-admin/admin.php?page=sbs-6310-template-41-503,17719.60529.59124.36
Template 11-20 /wp-admin/admin.php?page=sbs-6310-template-11-205,46341.301,124.61103.70
Import/Export Plugin /wp-admin/admin.php?page=sbs-6310-service-box-import-export1,0022.7348.9643.19
License /wp-admin/admin.php?page=sbs-6310-service-box-license1,0292.7235.8735.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_sbs_6310_item
    • wp_sbs_6310_style
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • sbs_6310_version_info

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/service-box-with-slider/settings/form/_search-form.php
    • > /wp-content/plugins/service-box-with-slider/settings/helper/tab-menu.php
    • > /wp-content/plugins/service-box-with-slider/settings/import-export-plugins.php
  • 236× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant sbs_6310_plugin_url - assumed 'sbs_6310_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/service-box-with-slider/common-template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/service-box-with-slider/settings/helper/_helper-25.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/service-box-with-slider/settings/helper/details_form_pro.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/service-box-with-slider/settings/templates/template-17.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/service-box-with-slider/output/template-01.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/service-box-with-slider/settings/helper/_helper-08.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/service-box-with-slider/settings/css/_css-50.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/service-box-with-slider/settings/templates/template-26.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/service-box-with-slider/settings/form/_form-33.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/service-box-with-slider/output/css/_css-05.php:4

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: service box, service box slider, services plugin

service-box-with-slider/index.php 92% from 13 tests

The main file in "Service Box Slider" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("service-box-with-slider.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin46,878 lines of code in 266 files:
LanguageFilesBlank linesComment linesLines of code
PHP2492,12996435,839
CSS10534698,246
JavaScript767682,793

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.81
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
assets/css/fs-sprite.png1.07KB0.18KB▼ 82.82%
assets/css/hover.png1.27KB0.66KB▼ 48.23%