84% wp-site-options

Code Review | WP Site Options

WordPress plugin WP Site Options scored84%from 54 tests.

About plugin

  • Plugin page: wp-site-options
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 7, 2017
  • Latest release: Mar 5, 2017
  • Number of updates: 31
  • Update frequency: every 0.8 days
  • Top authors: hokku (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,295 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.65ms] Passed 4 tests

An overview of server-side resources used by WP Site Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.58 ▼3.37
Dashboard /wp-admin3.38 ▲0.0752.78 ▼0.09
Posts /wp-admin/edit.php3.43 ▲0.0755.02 ▲0.44
Add New Post /wp-admin/post-new.php5.96 ▲0.0794.61 ▼15.57
Media Library /wp-admin/upload.php3.30 ▲0.0742.22 ▲3.68

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Site Options
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.22 ▼0.131.66 ▼0.1344.00 ▼1.03
Dashboard /wp-admin2,201 ▲245.62 ▲0.0595.35 ▼0.8742.81 ▼2.26
Posts /wp-admin/edit.php2,109 ▲92.02 ▲0.0543.16 ▲1.8835.40 ▲1.58
Add New Post /wp-admin/post-new.php1,532 ▼523.06 ▲4.81710.18 ▲31.4555.62 ▼8.31
Media Library /wp-admin/upload.php1,406 ▲64.13 ▼0.14111.81 ▼3.8147.27 ▼0.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • 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
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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-site-options/index.php
    • > /wp-content/plugins/wp-site-options/inc/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: settings, settings page, theme options, site options, options

wp-site-options/wp-site-options.php Passed 13 tests

The main file in "WP Site Options" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
27 characters long description:
Allow specify theme options

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin488 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP74724434
PO File1212354

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin