84% host-meta

Code Review | host-meta

WordPress plugin host-meta scored84%from 54 tests.

About plugin

  • Plugin page: host-meta
  • Plugin version: 1.3.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-6.3
  • WordPress version: 6.3.1
  • First release: Apr 20, 2010
  • Latest release: Sep 1, 2023
  • Number of updates: 48
  • Update frequency: every 101.7 days
  • Top authors: pfefferle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /5,485 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.18ms] Passed 4 tests

An overview of server-side resources used by host-meta
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.47 ▼4.83
Dashboard /wp-admin3.34 ▲0.0447.60 ▼3.03
Posts /wp-admin/edit.php3.39 ▲0.0450.90 ▲4.28
Add New Post /wp-admin/post-new.php5.92 ▲0.04100.38 ▲4.77
Media Library /wp-admin/upload.php3.26 ▲0.0436.55 ▲2.84

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for host-meta
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.62 ▲0.061.77 ▼0.3340.89 ▼0.13
Dashboard /wp-admin2,206 ▲154.89 ▼1.00107.14 ▲3.5542.57 ▲1.66
Posts /wp-admin/edit.php2,092 ▼02.18 ▲0.1640.73 ▼0.3337.34 ▲0.22
Add New Post /wp-admin/post-new.php1,542 ▲2318.65 ▼4.64597.54 ▼29.1753.89 ▲1.16
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0395.24 ▼4.1740.54 ▼4.16

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 detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/host-meta/host-meta.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: jrd, discovery, ostatus, xrd, host-meta

host-meta/host-meta.php Passed 13 tests

The principal PHP file in "host-meta" v. 1.3.2 is loaded by WordPress automatically on each request
27 characters long description:
Host Metadata for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected153 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22969153

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected