84% close-shop

Code Review | Close Shop

WordPress plugin Close Shop scored84%from 54 tests.

About plugin

  • Plugin page: close-shop
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2022
  • Latest release: Jan 11, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: webgurudesign78 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.92ms] Passed 4 tests

Analyzing server-side resources used by Close Shop
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0435.34 ▼3.17
Dashboard /wp-admin3.36 ▲0.0643.72 ▼6.68
Posts /wp-admin/edit.php3.41 ▲0.0547.83 ▲5.84
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.64 ▼14.31
Media Library /wp-admin/upload.php3.28 ▲0.0535.23 ▲4.50

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Close Shop
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.34 ▼1.084.22 ▲2.4444.74 ▼2.32
Dashboard /wp-admin2,221 ▲305.90 ▲0.99106.40 ▲1.2637.12 ▼8.44
Posts /wp-admin/edit.php2,101 ▲92.00 ▲0.0340.24 ▼0.5335.51 ▼1.11
Add New Post /wp-admin/post-new.php1,543 ▲2423.13 ▼0.01653.74 ▲12.6750.92 ▲5.00
Media Library /wp-admin/upload.php1,394 ▲64.15 ▼0.0495.46 ▼3.6144.90 ▲1.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/close-shop/close-shop.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: disable cart, disable checkout, open close shop, woo-commerce close shop, close shop...

close-shop/close-shop.php 92% from 13 tests

The main file in "Close Shop" 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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin338 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18443338

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin