84% headless-mode

Code Review | Headless Mode

WordPress plugin Headless Mode scored 84% from 54 tests.

About plugin

  • Plugin page: headless-mode
  • Plugin version: 0.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2019
  • Latest release: Nov 3, 2022
  • Number of updates: 12
  • Update frequency: every 90.3 days
  • Top authors: ben.meredith@gmail.com (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 15,253 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
Installer ran successfully

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

An overview of server-side resources used by Headless Mode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.31 ▲1.48
Dashboard /wp-admin3.31 ▲0.0147.59 ▼1.91
Posts /wp-admin/edit.php3.36 ▲0.0048.18 ▲1.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.21 ▼7.19
Media Library /wp-admin/upload.php3.23 ▲0.0036.11 ▲3.45
Headless Mode /wp-admin/options-general.php?page=headless-mode3.2031.07

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Headless Mode: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼0.921.70 ▼0.1444.17 ▼0.22
Dashboard /wp-admin2,210 ▲225.79 ▲0.82104.91 ▼14.4039.61 ▼4.87
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0439.76 ▲1.0336.33 ▲4.27
Add New Post /wp-admin/post-new.php1,540 ▲723.04 ▼0.15681.85 ▼23.8961.69 ▲7.10
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.1199.77 ▼9.6143.28 ▼4.65
Headless Mode /wp-admin/options-general.php?page=headless-mode7742.1824.1438.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/headless-mode/headless-mode.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: static, headless, gatsby, jamstack

headless-mode/headless-mode.php 92% from 13 tests

The main PHP file in "Headless Mode" ver. 0.4.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1204967

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
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
There were not PNG files found in your plugin