83% schedule-disponibilities

Code Review | Business Time

WordPress plugin Business Time scored83%from 54 tests.

About plugin

  • Plugin page: schedule-disponib...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Sep 22, 2015
  • Number of updates: 27
  • Update frequency: every 0.6 days
  • Top authors: devnco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,025 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.11ms] Passed 4 tests

An overview of server-side resources used by Business Time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0150.99 ▲6.62
Dashboard /wp-admin3.31 ▲0.0152.08 ▼5.48
Posts /wp-admin/edit.php3.36 ▲0.0049.13 ▼0.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.24 ▼15.57
Media Library /wp-admin/upload.php3.23 ▲0.0039.00 ▲0.98

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Business Time
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.72 ▲0.421.88 ▼0.0745.59 ▲2.72
Dashboard /wp-admin2,197 ▲175.56 ▼0.1282.27 ▼16.6438.66 ▼7.10
Posts /wp-admin/edit.php2,102 ▲22.06 ▲0.0736.58 ▲1.3935.93 ▲1.01
Add New Post /wp-admin/post-new.php1,680 ▲13823.12 ▲5.01648.75 ▲49.6752.68 ▼1.61
Media Library /wp-admin/upload.php1,396 ▼44.25 ▲0.0496.84 ▼4.8340.51 ▼4.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% 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 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/schedule-disponibilities/business-time.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (A view of a shortcode used in a post article), #2 (Here is a render of the schedule)
  • Plugin Name: Please specify the plugin name on the first line ( === schedule-disponibilities === )
You can look at the official readme.txt

schedule-disponibilities/business-time.php 92% from 13 tests

The primary PHP file in "Business Time" version 1.0.8 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("schedule-disponibilities.php" instead of "business-time.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected437 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22116253
CSS11674
JavaScript1132565
PO File1151645

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png62.44KB18.96KB▼ 69.63%
screenshot-2.png52.94KB13.37KB▼ 74.74%