84% headless

Code Review | Headless

WordPress plugin Headless scored84%from 54 tests.

About plugin

  • Plugin page: headless
  • Plugin version: 1.9.3
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 25, 2022
  • Latest release: Nov 13, 2023
  • Number of updates: 29
  • Update frequency: every 18.5 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /754 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Headless
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.77 ▼5.81
Dashboard /wp-admin3.31 ▲0.0046.00 ▼6.81
Posts /wp-admin/edit.php3.36 ▲0.0045.42 ▼0.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.99 ▼17.61
Media Library /wp-admin/upload.php3.23 ▲0.0032.28 ▼0.79

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Headless
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.18 ▲0.011.90 ▲0.1642.60 ▼1.67
Dashboard /wp-admin2,192 ▲125.63 ▼0.0190.95 ▲1.5538.68 ▼0.57
Posts /wp-admin/edit.php2,103 ▲32.14 ▲0.1940.76 ▲2.7837.37 ▲3.20
Add New Post /wp-admin/post-new.php1,526 ▼923.85 ▲0.64634.19 ▼28.8065.04 ▲15.19
Media Library /wp-admin/upload.php1,403 ▲64.18 ▼0.00104.06 ▲5.3641.45 ▼0.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • 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
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 35× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Palasthotel\\WordPress\\Headless\\Interfaces\\IBlockPreparation' not found in wp-content/plugins/headless/classes/BlockPreparations/ReferenceBlockPreparation.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Palasthotel\\WordPress\\Headless\\Interfaces\\IBlockPreparation' not found in wp-content/plugins/headless/classes/BlockPreparations/EmbedBlockPreparation.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Palasthotel\\WordPress\\Headless\\Interfaces\\IBlockPreparation' not found in wp-content/plugins/headless/classes/BlockPreparations/FreeFormBlockPreparation.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Headless\\Components\\Component' not found in wp-content/plugins/headless/classes/Routes/Settings.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Headless\\Extensions\\AbsPostExtensionPost' not found in wp-content/plugins/headless/classes/Extensions/Taxonomies.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Headless\\Components\\Component' not found in wp-content/plugins/headless/classes/Dashboard.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Palasthotel\\WordPress\\Headless\\Interfaces\\ICommentRouteExtension' not found in wp-content/plugins/headless/classes/Extensions/CommentAuthorUser.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Palasthotel\\WordPress\\Headless\\Interfaces\\IBlockPreparation' not found in wp-content/plugins/headless/classes/BlockPreparations/MoreBlockPreparation.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Headless\\Components\\Component' not found in wp-content/plugins/headless/classes/Log.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Headless\\Components\\Component' not found in wp-content/plugins/headless/classes/PluginAssets.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: gutenberg, block, developer, utils

headless/headless.php Passed 13 tests

"Headless" version 1.9.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Adds features to use WordPress as headless CMS

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
No dangerous file extensions were detected2,291 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP656395502,283
JSON1005
JavaScript2002
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.04
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces5
Traits0
Classes52
▷ Abstract classes47.69%
▷ Concrete classes4892.31%
▷ Final classes00.00%
Methods185
▷ Static methods2815.14%
▷ Public methods17494.05%
▷ Protected methods00.00%
▷ Private methods115.95%
Functions24
▷ Named functions312.50%
▷ Anonymous functions2187.50%
Constants43
▷ Global constants613.95%
▷ Class constants3786.05%
▷ Public constants37100.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
No PNG images were found in this plugin