52% sppx-offerings

Code Review | SPPX Offerings

WordPress plugin SPPX Offerings scored52%from 54 tests.

About plugin

  • Plugin page: sppx-offerings
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Apr 26, 2022
  • Latest release: Apr 26, 2022
  • Number of updates: 8
  • Update frequency: every 2.3 days
  • Top authors: bitsource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /209 total downloads

Benchmarks

Plugin footprint 48% 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.13MB] [CPU: ▼7.84ms] Passed 4 tests

An overview of server-side resources used by SPPX Offerings
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1240.09 ▲1.35
Dashboard /wp-admin3.43 ▲0.0844.99 ▼20.19
Posts /wp-admin/edit.php3.55 ▲0.1943.94 ▲3.71
Add New Post /wp-admin/post-new.php6.12 ▲0.2383.73 ▼14.77
Media Library /wp-admin/upload.php3.35 ▲0.1234.30 ▲2.26
Issues /wp-admin/edit.php?post_type=issue3.4038.81
Add New Issue /wp-admin/post-new.php?post_type=issue6.1081.03
Issue Plugin Menu /wp-admin/options-general.php?page=silicon_prairie_issues3.3030.97

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SPPX Offerings
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.34 ▼1.018.15 ▲6.4642.07 ▼2.73
Dashboard /wp-admin2,233 ▲595.59 ▲0.0282.96 ▼16.6540.04 ▼4.28
Posts /wp-admin/edit.php2,132 ▲322.02 ▲0.0533.38 ▼3.7131.61 ▼8.23
Add New Post /wp-admin/post-new.php1,556 ▲2123.09 ▲5.07672.78 ▲32.1363.83 ▲14.56
Media Library /wp-admin/upload.php1,438 ▲384.24 ▲0.03105.24 ▲9.1647.27 ▲6.62
Issues /wp-admin/edit.php?post_type=issue1,1161.9635.2230.09
Add New Issue /wp-admin/post-new.php?post_type=issue6,25820.01854.1438.71
Issue Plugin Menu /wp-admin/options-general.php?page=silicon_prairie_issues8202.0026.5134.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/sppx-offerings/includes/class-silicon_prairie_issues-deactivator.php+34
    Uncaught Error: Call to undefined function flush_rerwrite_rules() in wp-content/plugins/sppx-offerings/includes/class-silicon_prairie_issues-deactivator.php:34
    Stack trace:
    #0 wp-content/plugins/sppx-offerings/silicon_prairie_issues.php(55): Silicon_prairie_issues_Deactivator::deactivate()
    #1 wp-includes/class-wp-hook.php(310): deactivate_silicon_prairie_issues()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(816): do_action()
  • The plugin did not uninstall successfully, leaving 28 files (0.09MB) in the plugin directory
    • (new file) admin/index.php
    • (new file) admin/css/silicon_prairie_issues-admin.css
    • (new file) includes/class-silicon_prairie_issues-i18n.php
    • (new file) README.txt
    • (new file) LICENSE.txt
    • (new file) admin/js/silicon_prairie_issues-admin.js
    • (new file) admin/class-silicon_prairie_issues-admin.php
    • (new file) includes/class-silicon_prairie_issues-activator.php
    • (new file) includes/class-silicon_prairie_issues-deactivator.php
    • (new file) admin/partials/silicon_prairie_issues-admin-display.php
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=silicon_prairie_issues
    • > Notice in wp-content/plugins/sppx-offerings/admin/class-silicon_prairie_issues-admin.php+134
    Trying to access array offset on value of type bool

SRP 0% 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 fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/sppx-offerings/public/partials/silicon_prairie_issues-public-display.php
    • > /wp-content/plugins/sppx-offerings/admin/partials/silicon_prairie_issues-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/sppx-offerings/public/templates/single-deal.php:3

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Issue creation form.), #2 (Plugin settings page.)
The official readme.txt might help

sppx-offerings/silicon_prairie_issues.php 85% from 13 tests

The main PHP file in "SPPX Offerings" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sppx-offerings.php" instead of "silicon_prairie_issues.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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 detected1,384 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP17245615966
CSS211338412
JavaScript24546

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.88
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods38.33%
▷ Public methods3083.33%
▷ Protected methods00.00%
▷ Private methods616.67%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
public/templates/images/application-pdf.png0.34KB0.39KB0.00%