83% plusprice

Code Review | PlusPrice

WordPress plugin PlusPrice scored83%from 54 tests.

About plugin

  • Plugin page: plusprice
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Nov 26, 2022
  • Number of updates: 8
  • Update frequency: every 120.5 days
  • Top authors: themeshape (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /500 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.70ms] Passed 4 tests

Analyzing server-side resources used by PlusPrice
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.80 ▼2.71
Dashboard /wp-admin3.32 ▲0.0246.78 ▼7.21
Posts /wp-admin/edit.php3.37 ▲0.0248.84 ▲4.65
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.32 ▲4.40
Media Library /wp-admin/upload.php3.25 ▲0.0231.11 ▼1.27

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

PlusPrice: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.65 ▼0.731.79 ▼0.1045.48 ▲2.55
Dashboard /wp-admin2,224 ▲364.84 ▼0.06111.97 ▼8.0342.56 ▼1.53
Posts /wp-admin/edit.php2,106 ▲172.04 ▲0.0438.01 ▲1.1432.65 ▲0.23
Add New Post /wp-admin/post-new.php1,546 ▲1323.28 ▼0.43685.98 ▲28.9850.67 ▼15.15
Media Library /wp-admin/upload.php1,409 ▲214.23 ▲0.05100.78 ▲5.7543.90 ▲0.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 wp_die() in wp-content/plugins/plusprice/plugsprice.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: drag-and-drop, elementor pricing table, elementor, drgu and drop pricing table, landing page...

plusprice/plugsprice.php 77% from 13 tests

The main PHP script in "PlusPrice" version 1.0.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 168 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("plusprice.php" instead of "plugsprice.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
Everything looks great! No dangerous files found in this plugin11,473 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,299
PHP315233956
Sass1730671
CSS25741518
Markdown17017
JavaScript10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity5.33
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods25
▷ Static methods14.00%
▷ Public methods1976.00%
▷ Protected methods624.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/pricing-shape.png2.02KB2.21KB0.00%