84% options-for-twenty-twenty-one

Code Review | Options for Twenty Twenty-One

WordPress plugin Options for Twenty Twenty-One scored84%from 54 tests.

About plugin

  • Plugin page: options-for-twent...
  • Plugin version: 1.7.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2020
  • Latest release: Oct 30, 2023
  • Number of updates: 87
  • Update frequency: every 12.5 days
  • Top authors: domainsupport (100%)

Code review

54 tests

User reviews

59 reviews

Install metrics

10,000+ active /185,325 total downloads

Benchmarks

Plugin footprint 83% 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.52MB] [CPU: ▼8.53ms] Passed 4 tests

This is a short check of server-side resources used by Options for Twenty Twenty-One
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7242.70 ▲0.96
Dashboard /wp-admin4.00 ▲0.6652.83 ▼12.74
Posts /wp-admin/edit.php4.12 ▲0.7648.67 ▲4.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0166.88 ▼24.68
Media Library /wp-admin/upload.php3.93 ▲0.7036.27 ▲2.35

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Options for Twenty Twenty-One: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲5014.27 ▼0.291.76 ▲0.0043.70 ▼2.64
Dashboard /wp-admin2,195 ▲155.51 ▼0.0582.73 ▼11.3236.62 ▼3.45
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0036.71 ▲0.8733.67 ▼1.79
Add New Post /wp-admin/post-new.php1,536 ▲1018.51 ▼4.67597.48 ▼56.4065.52 ▲8.46
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.00103.35 ▲5.8143.52 ▲1.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/options-for-twenty-twenty-one/options-for-twenty-twenty-one.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: customize, twenty-twenty-one, twentytwentyone, change, modify

options-for-twenty-twenty-one/options-for-twenty-twenty-one.php Passed 13 tests

The principal PHP file in "Options for Twenty Twenty-One" v. 1.7.2 is loaded by WordPress automatically on each request
103 characters long description:
Adds powerful customizer options to modify all aspects of the default Wordpress theme Twenty Twenty-One

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected4,891 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2948264,196
JavaScript31203682
CSS11013

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 107)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity94.33
▷ Minimum class complexity6.00
▷ Maximum class complexity192.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity107.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods2665.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
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