84% offerprice

Code Review | OfferPrice

WordPress plugin OfferPrice scored84%from 54 tests.

About plugin

  • Plugin page: offerprice
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Aug 27, 2013
  • Latest release: Nov 19, 2013
  • Number of updates: 3
  • Update frequency: every 28.4 days
  • Top authors: krawa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /847 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼16.95ms] Passed 4 tests

An overview of server-side resources used by OfferPrice
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6520.15 ▼22.47
Dashboard /wp-admin3.22 ▼0.0941.68 ▼9.22
Posts /wp-admin/edit.php3.17 ▼0.1931.72 ▼24.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.72 ▼12.04
Media Library /wp-admin/upload.php3.23 ▲0.0040.47 ▲2.56

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for OfferPrice
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.27 ▼1.494.87 ▲3.2144.39 ▼3.57
Dashboard /wp-admin2,221 ▲154.87 ▼0.03109.19 ▲2.7038.51 ▼5.78
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0139.49 ▲1.6934.04 ▼7.60
Add New Post /wp-admin/post-new.php1,544 ▲1323.35 ▲0.10614.03 ▼77.0861.35 ▲4.65
Media Library /wp-admin/upload.php1,403 ▲34.35 ▲0.2098.54 ▼13.1748.87 ▼0.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/offerprice/offerprice.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (OfferPrice plugin in action) image missing
You can look at the official readme.txt

offerprice/offerprice.php 92% from 13 tests

The main PHP file in "OfferPrice" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 240 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171042

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected