89% connections-business-directory-hours

Code Review | Connections Business Directory Open Hours

WordPress plugin Connections Business Directory Open Hours scored89%from 54 tests.

About plugin

  • Plugin page: connections-busin...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2
  • WordPress version: 6.3.1
  • First release: May 4, 2014
  • Latest release: Apr 3, 2023
  • Number of updates: 57
  • Update frequency: every 57.1 days
  • Top authors: shazahm1@hotmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /15,041 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.27ms] Passed 4 tests

Server-side resources used by Connections Business Directory Open Hours
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.21 ▲1.76
Dashboard /wp-admin3.39 ▲0.0452.62 ▼9.97
Posts /wp-admin/edit.php3.50 ▲0.1552.19 ▼0.24
Add New Post /wp-admin/post-new.php5.97 ▲0.0896.06 ▼8.64
Media Library /wp-admin/upload.php3.31 ▲0.0837.64 ▲5.05

Server storage [IO: ▲0.20MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Connections Business Directory Open Hours
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.28 ▼0.292.06 ▲0.2845.68 ▲4.81
Dashboard /wp-admin2,197 ▲205.62 ▼0.0599.06 ▲6.6442.58 ▲2.40
Posts /wp-admin/edit.php2,105 ▲22.04 ▲0.0440.64 ▲0.5638.61 ▼1.60
Add New Post /wp-admin/post-new.php1,531 ▲523.38 ▲0.16677.30 ▼17.7753.07 ▼6.28
Media Library /wp-admin/upload.php1,405 ▲144.22 ▲0.11104.85 ▼2.8642.83 ▼0.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 52 tag instead of maximum 10
You can take inspiration from this readme.txt

connections-business-directory-hours/connections_hours.php 85% from 13 tests

The main PHP script in "Connections Business Directory Open Hours" version 1.2.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("connections-business-directory-hours.php" instead of "connections_hours.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,065 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42423321,957
PHP3229332599
PO File3108155307
CSS44330202

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity52.00
▷ Minimum class complexity41.00
▷ Maximum class complexity63.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods2177.78%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/x.png0.19KB0.09KB▼ 52.26%