84% wp-headless

Code Review | WP Headless

WordPress plugin WP Headless scored84%from 54 tests.

About plugin

  • Plugin page: wp-headless
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2018
  • Latest release: Apr 25, 2019
  • Number of updates: 4
  • Update frequency: every 73.3 days
  • Top authors: sephsekla (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /6,328 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.16MB] [CPU: ▼13.68ms] Passed 4 tests

An overview of server-side resources used by WP Headless
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6516.93 ▼24.22
Dashboard /wp-admin3.31 ▲0.0047.16 ▼6.92
Posts /wp-admin/edit.php3.36 ▲0.0049.29 ▼4.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.34 ▼19.39
Media Library /wp-admin/upload.php3.23 ▲0.0035.95 ▲0.80

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Headless
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,556 ▲1,79516.32 ▲2.1043.98 ▲42.287.47 ▼34.27
Dashboard /wp-admin2,195 ▲185.51 ▼0.0953.33 ▼33.4939.68 ▼5.93
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0331.62 ▼9.2135.81 ▼2.39
Add New Post /wp-admin/post-new.php1,530 ▲122.97 ▼0.08585.06 ▼72.1559.76 ▲1.03
Media Library /wp-admin/upload.php1,397 ▼34.22 ▲0.06101.32 ▼5.0147.50 ▲0.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-headless/wp-headless.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

wp-headless/wp-headless.php Passed 13 tests

The primary PHP file in "WP Headless" version 1.0.1 is used by WordPress to initiate all plugin functionality
59 characters long description:
A lightweight plugin to disable the WP frontend experience.

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 plugin34 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1162425
Markdown1709

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin