83% scorpion-ppf-product-extension

Code Review | Scorpion PPF Product Extension

WordPress plugin Scorpion PPF Product Extension scored 83% from 54 tests.

About plugin

  • Plugin page: scorpion-ppf-prod...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-5.5.0
  • WordPress version: 5.8.1
  • First release: Sep 30, 2020
  • Latest release: Oct 13, 2020
  • Number of updates: 13
  • Update frequency: every 0.9 days
  • Top authors: c2itconsulting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 123 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Scorpion PPF Product Extension
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.69 ▼0.0324.50 ▲2.96
Dashboard /wp-admin3.08 ▲0.0342.21 ▼1.69
Posts /wp-admin/edit.php3.13 ▲0.0243.16 ▲0.26
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.55 ▼577.10
Media Library /wp-admin/upload.php3.02 ▲0.0227.86 ▼10.04
Scorpion PPF /wp-admin/options-general.php?page=scorpion_ppf_admin3.0330.70

Server storage [IO: ▲1.09MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 8 files (0.00KB) outside of "wp-content/plugins/scorpion-ppf-product-extension/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/scorpion-ppf-product-extension/colorbox/colorbox-master/content/Icon\357\200\215"
    • (new file) "wp-content/plugins/scorpion-ppf-product-extension/colorbox/Icon\357\200\215"
    • (new file) "wp-content/plugins/scorpion-ppf-product-extension/css/Icon\357\200\215"
    • (new file) "wp-content/plugins/scorpion-ppf-product-extension/inc/Icon\357\200\215"
    • (new file) "wp-content/plugins/scorpion-ppf-product-extension/colorbox/colorbox-master/i18n/Icon\357\200\215"
    • (new file) "wp-content/plugins/scorpion-ppf-product-extension/colorbox/colorbox-master/Icon\357\200\215"
    • (new file) "wp-content/plugins/scorpion-ppf-product-extension/colorbox/images/Icon\357\200\215"
    • (new file) "wp-content/plugins/scorpion-ppf-product-extension/Icon\357\200\215"
Filesystem: 71 new files
Database: no new tables, 1 new option
New WordPress options
widget_scorpion_ppf_widget

Browser metrics Passed 4 tests

A check of browser resources used by Scorpion PPF Product Extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,261 ▼34516.10 ▲0.460.44 ▼9.3310.22 ▼37.29
Dashboard /wp-admin2,980 ▲496.17 ▲0.15137.46 ▼4.07104.95 ▼10.22
Posts /wp-admin/edit.php2,743 ▲42.72 ▼0.0069.77 ▲2.68100.31 ▲11.89
Add New Post /wp-admin/post-new.php1,677 ▲118.86 ▲0.09376.56 ▲5.6897.46 ▼19.00
Media Library /wp-admin/upload.php1,817 ▲105.04 ▲0.03144.25 ▲4.07110.37 ▼9.92
Scorpion PPF /wp-admin/options-general.php?page=scorpion_ppf_admin1,6702.1054.6181.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_scorpion_ppf_widget

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
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 items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/scorpion-ppf-product-extension/inc/scorpion_ppf_common.php
    • > /wp-content/plugins/scorpion-ppf-product-extension/inc/scorpion_ppf_product.php
    • > /wp-content/plugins/scorpion-ppf-product-extension/inc/scorpion_ppf_admin.php
    • > /wp-content/plugins/scorpion-ppf-product-extension/scorpion-ppf.php
    • > /wp-content/plugins/scorpion-ppf-product-extension/inc/scorpion_ppf_widget.php
    • > /wp-content/plugins/scorpion-ppf-product-extension/inc/scorpion_ppf_shortcodes.php

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 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === scorpion-ppf-product-extension === )
You can look at the official readme.txt

scorpion-ppf-product-extension/scorpion-ppf.php 92% from 13 tests

The entry point to "Scorpion PPF Product Extension" version 0.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("scorpion-ppf-product-extension.php" instead of "scorpion-ppf.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,551 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript433233731,519
Markdown22160425
PHP611786233
CSS31929190
HTML330115
JSON20069

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
colorbox/images/controls.png0.49KB0.57KB0.00%