84% onet-header-linkifier

Code Review | ONet Header Linkifier

WordPress plugin ONet Header Linkifier scored84%from 54 tests.

About plugin

  • Plugin page: onet-header-linki...
  • Plugin version: 1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: Nov 29, 2013
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: orosznyet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /833 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.34ms] Passed 4 tests

Analyzing server-side resources used by ONet Header Linkifier
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1150.14 ▲1.81
Dashboard /wp-admin3.42 ▲0.0856.00 ▼11.21
Posts /wp-admin/edit.php3.53 ▲0.1858.98 ▲5.10
Add New Post /wp-admin/post-new.php6.00 ▲0.1188.79 ▼25.04
Media Library /wp-admin/upload.php3.34 ▲0.1244.69 ▲7.01

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for ONet Header Linkifier
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15113.48 ▼1.169.68 ▲7.8937.73 ▼0.30
Dashboard /wp-admin2,195 ▲185.62 ▼0.0490.19 ▼4.9439.65 ▼1.54
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0439.83 ▲1.4936.07 ▲1.67
Add New Post /wp-admin/post-new.php1,544 ▲1823.18 ▼0.05621.53 ▼66.9752.01 ▼2.83
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.0096.54 ▼11.2147.14 ▲1.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please take a closer look at the following
  • 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/onet-header-linkifier/onet-header-linkifier.php:36

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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: toc, auto, anchor, post, header

onet-header-linkifier/onet-header-linkifier.php 92% from 13 tests

The primary PHP file in "ONet Header Linkifier" version 1.12 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin551 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP1105212312
PO File25068155
JavaScript1121933
LESS10125
Markdown117025
CSS1001

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.46
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
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
2 PNG files occupy 0.08MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/link.png2.88KB0.19KB▼ 93.26%
assets/screenshot-1.png78.36KB22.64KB▼ 71.11%