90% gp-price-block

Code Review | GP Price block

WordPress plugin GP Price block scored90%from 54 tests.

About plugin

  • Plugin page: gp-price-block
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1+
  • WordPress version: 6.3.1
  • First release: Oct 23, 2020
  • Latest release: Mar 18, 2023
  • Number of updates: 12
  • Update frequency: every 73.2 days
  • Top authors: Goodwin_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.63ms] Passed 4 tests

A check of server-side resources used by GP Price block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.56 ▲0.21
Dashboard /wp-admin3.31 ▲0.0144.96 ▼3.13
Posts /wp-admin/edit.php3.36 ▲0.0049.38 ▲5.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.11 ▲1.73
Media Library /wp-admin/upload.php3.23 ▲0.0037.12 ▲3.71

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

GP Price block: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.28 ▼1.311.71 ▼0.0344.93 ▲1.20
Dashboard /wp-admin2,209 ▲244.85 ▼0.9798.53 ▼6.1438.47 ▼0.98
Posts /wp-admin/edit.php2,086 ▼31.98 ▲0.0140.25 ▲5.4234.24 ▼0.99
Add New Post /wp-admin/post-new.php6,354 ▲4,84027.56 ▲9.99824.65 ▲137.2757.24 ▲5.18
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0293.52 ▼16.1741.13 ▼7.80

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: block, gutenberg, editor, goodwin, goodwinpress...

gp-price-block/index.php 92% from 13 tests

The principal PHP file in "GP Price block" v. 1.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("gp-price-block.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin182 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript114081
CSS210263
PHP1121838

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin