78% correct-prices

Code Review | Correct Prices

WordPress plugin Correct Prices scored 78% from 54 tests.

About plugin

  • Plugin page: correct-prices
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.7
  • WordPress version: 5.8.1
  • First release: Jun 10, 2016
  • Latest release: Jul 30, 2016
  • Number of updates: 5
  • Update frequency: every 36.4 days
  • Top authors: lykich (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.90MB] [CPU: ▼178.83ms] Passed 4 tests

A check of server-side resources used by Correct Prices
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1327.76 ▲4.87
Dashboard /wp-admin2.75 ▼0.3015.76 ▼25.81
Posts /wp-admin/edit.php2.75 ▼0.3619.28 ▼25.19
Add New Post /wp-admin/post-new.php2.75 ▼2.6816.31 ▼642.91
Media Library /wp-admin/upload.php2.75 ▼0.2518.39 ▼21.42
Correct Prisec /wp-admin/options-general.php?page=correct_prices2.7519.58

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
correct_prices_plugin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Correct Prices
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲19816.27 ▲0.6612.25 ▲2.6649.26 ▼0.09
Dashboard /wp-admin2,997 ▲666.02 ▲0.10134.70 ▼7.49111.05 ▼0.10
Posts /wp-admin/edit.php2,741 ▲22.82 ▲0.1364.61 ▲0.8394.29 ▲5.82
Add New Post /wp-admin/post-new.php3,580 ▲1,99914.80 ▼3.46441.51 ▲63.80110.16 ▼24.42
Media Library /wp-admin/upload.php1,815 ▲85.01 ▼0.02150.66 ▼13.67120.32 ▼9.14
Correct Prisec /wp-admin/options-general.php?page=correct_prices1,0332.2254.9272.84

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
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=correct_prices
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/correct-prices/correct_prices.php:192

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

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: number, page, coefficient, post, correct prices

correct-prices/correct_prices.php 92% from 13 tests

This is the main PHP file of "Correct Prices" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("correct-prices.php" instead of "correct_prices.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
No dangerous file extensions were detected140 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2746589
JavaScript225651

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions9
▷ Named functions9100.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
There are no PNG files in this plugin