84% off-your-site

Code Review | Off Your Site

WordPress plugin Off Your Site scored84%from 54 tests.

About plugin

  • Plugin page: off-your-site
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7.5
  • WordPress version: 6.3.1
  • First release: Nov 18, 2015
  • Latest release: Aug 4, 2016
  • Number of updates: 22
  • Update frequency: every 25.9 days
  • Top authors: enqtran (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,984 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Off Your Site
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.14 ▲8.63
Dashboard /wp-admin3.31 ▼0.0343.72 ▼13.45
Posts /wp-admin/edit.php3.36 ▲0.0143.77 ▼6.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.04 ▼15.74
Media Library /wp-admin/upload.php3.23 ▲0.0133.52 ▼0.94

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Off Your Site: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.35 ▼0.021.69 ▲0.0542.17 ▲0.70
Dashboard /wp-admin2,211 ▲345.55 ▼0.0383.27 ▼4.4339.77 ▼1.63
Posts /wp-admin/edit.php2,116 ▲162.01 ▼0.0133.18 ▼5.1538.89 ▲3.43
Add New Post /wp-admin/post-new.php1,561 ▲3518.50 ▼4.85627.36 ▼53.6168.81 ▲18.67
Media Library /wp-admin/upload.php1,419 ▲164.24 ▲0.0997.50 ▼3.7144.08 ▼3.02

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/off-your-site/plugin_off_your_website.php:20

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (screenshot-1.png), #2 (screenshot-2.png)
Please take inspiration from this readme.txt

off-your-site/plugin_off_your_website.php 92% from 13 tests

"Off Your Site" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("off-your-site.php" instead of "plugin_off_your_website.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected72 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP162172

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png33.78KB14.94KB▼ 55.78%
screenshot-2.png5.32KB4.15KB▼ 21.91%