84% wp-soononline-page

Code Review | WPsoonOnlinePage

WordPress plugin WPsoonOnlinePage scored84%from 54 tests.

About plugin

  • Plugin page: wp-soononline-page
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2013
  • Latest release: May 24, 2015
  • Number of updates: 22
  • Update frequency: every 37.2 days
  • Top authors: elsteno (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /35,170 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.11ms] Passed 4 tests

An overview of server-side resources used by WPsoonOnlinePage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.43 ▼1.11
Dashboard /wp-admin3.33 ▲0.0343.44 ▼3.32
Posts /wp-admin/edit.php3.38 ▲0.0346.89 ▼0.19
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.78 ▼7.83
Media Library /wp-admin/upload.php3.25 ▲0.0237.72 ▲4.91
WP Soon Online /wp-admin/options-general.php?page=soonOnlineMainOptions3.2837.56

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPsoonOnlinePage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.36 ▼1.021.64 ▼0.2342.31 ▼3.28
Dashboard /wp-admin2,217 ▲265.03 ▼0.83102.45 ▼3.1139.49 ▼0.95
Posts /wp-admin/edit.php2,119 ▲332.45 ▲0.4252.44 ▲17.0037.82 ▼0.00
Add New Post /wp-admin/post-new.php1,524 ▲1023.58 ▲6.13662.83 ▼31.5652.94 ▼6.86
Media Library /wp-admin/upload.php1,412 ▲274.46 ▲0.27102.46 ▼4.5144.50 ▼0.73
WP Soon Online /wp-admin/options-general.php?page=soonOnlineMainOptions2,1177.03154.2360.50

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-soononline-page/soononlinepage.php on line 30
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-soononline-page/soononlinepage.php on line 30
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-soononline-page/soononlinepage-options.php:77
    • > PHP Notice
      Undefined index: PHP_SELF in wp-content/plugins/wp-soononline-page/soononlinepage-options.php on line 77
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/wp-soononline-page/soononlinepage.php on line 30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: maintance mode, construction, soon online, security, underconstruction...

wp-soononline-page/soononlinepage.php 92% from 13 tests

"WPsoonOnlinePage" version 1.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-soononline-page.php" instead of "soononlinepage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin466 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP311830440
JavaScript24326

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png61.98KB24.33KB▼ 60.75%