90% options-management

Code Review | Options Management

WordPress plugin Options Management scored90%from 54 tests.

About plugin

  • Plugin page: options-management
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 20, 2018
  • Latest release: Aug 30, 2018
  • Number of updates: 8
  • Update frequency: every 5.4 days
  • Top authors: hive4apps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /640 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.16ms] Passed 4 tests

A check of server-side resources used by Options Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.33 ▼7.85
Dashboard /wp-admin3.33 ▲0.0350.85 ▼0.73
Posts /wp-admin/edit.php3.38 ▲0.0251.46 ▼0.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.11 ▲0.93
Media Library /wp-admin/upload.php3.25 ▲0.0236.66 ▲1.08
Options Management /wp-admin/tools.php?page=options-management3.2834.91

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

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification found: 4 files (0.00KB) outside of "wp-content/plugins/options-management/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/options-management/assets/icon-256\303\227256.jpg"
    • (new file) "wp-content/plugins/options-management/assets/banner-772\303\227250.jpg"
    • (new file) "wp-content/plugins/options-management/assets/banner-1544\303\227500.jpg"
    • (new file) "wp-content/plugins/options-management/assets/icon-128\303\227128.jpg"
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Options Management
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.111.71 ▼0.0842.85 ▼6.05
Dashboard /wp-admin2,196 ▲195.74 ▲0.1685.47 ▼6.9440.02 ▼1.48
Posts /wp-admin/edit.php2,107 ▲41.96 ▼0.0538.77 ▼0.7034.63 ▼0.27
Add New Post /wp-admin/post-new.php1,529 ▲123.15 ▲0.15612.84 ▲21.1859.97 ▲6.14
Media Library /wp-admin/upload.php1,407 ▲44.18 ▼0.07100.42 ▼4.8443.78 ▼3.31
Options Management /wp-admin/tools.php?page=options-management5,0971.8230.5273.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: options, tool, debug

options-management/options-management.php Passed 13 tests

The main PHP script in "Options Management" version 1.1 is automatically included on every request by WordPress
67 characters long description:
A small plugin for developers to manage manually wordpress 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
Everything looks great! No dangerous files found in this plugin206 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42927136
CSS115045
SVG10125

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods240.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
There are no PNG files in this plugin