84% headless-pages

Code Review | Headless Pages

WordPress plugin Headless Pages scored84%from 54 tests.

About plugin

  • Plugin page: headless-pages
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 19, 2020
  • Latest release: Dec 19, 2020
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: johnmmackey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,686 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Headless Pages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.54 ▲0.88
Dashboard /wp-admin3.31 ▲0.0051.27 ▼0.80
Posts /wp-admin/edit.php3.36 ▲0.0046.66 ▼7.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.40 ▼14.42
Media Library /wp-admin/upload.php3.23 ▲0.0039.50 ▲4.49

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Headless Pages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.141.87 ▲0.2145.40 ▼3.37
Dashboard /wp-admin2,198 ▲175.59 ▼0.1294.65 ▼8.3142.69 ▼0.97
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0135.08 ▼4.1533.45 ▼3.03
Add New Post /wp-admin/post-new.php1,526 ▼923.63 ▲5.55674.85 ▲16.0056.70 ▼13.05
Media Library /wp-admin/upload.php1,397 ▲34.21 ▲0.00102.01 ▲0.8148.79 ▲2.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
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-pages/headless-pages.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
2 plugin tags: headless, cms

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

The main file in "Headless Pages" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
119 characters long description:
Disables the default WP editor and other unneeded features on the Page Edit screen for use in headless CMS applications

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11138

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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 functions00.00%
▷ Anonymous functions1100.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