84% hectane

Code Review | Hectane

WordPress plugin Hectane scored84%from 54 tests.

About plugin

  • Plugin page: hectane
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Jul 19, 2016
  • Number of updates: 16
  • Update frequency: every 17.8 days
  • Top authors: george_edison (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.95ms] Passed 4 tests

A check of server-side resources used by Hectane
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0534.58 ▼3.74
Dashboard /wp-admin3.37 ▲0.0744.16 ▼3.94
Posts /wp-admin/edit.php3.49 ▲0.1347.93 ▲1.64
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.19 ▼2.86
Media Library /wp-admin/upload.php3.30 ▲0.0734.10 ▼1.26
Hectane /wp-admin/options-general.php?page=hectane3.2631.62

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hectane
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4714.61 ▲0.051.80 ▼0.0339.88 ▼0.60
Dashboard /wp-admin2,193 ▲135.53 ▼0.1384.61 ▼2.2838.20 ▼6.86
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0439.21 ▲3.4435.71 ▼3.69
Add New Post /wp-admin/post-new.php1,529 ▲223.22 ▲0.17636.85 ▼28.4761.74 ▼3.42
Media Library /wp-admin/upload.php1,404 ▲74.22 ▼0.02102.91 ▼3.7345.97 ▼3.24
Hectane /wp-admin/options-general.php?page=hectane8342.0027.8029.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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
Good news, no errors were detected

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/hectane/hectane.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/hectane/hectane_api.php:3

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
2 plugin tags: mail, email

hectane/hectane.php Passed 13 tests

Analyzing the main PHP file in "Hectane" version 0.1.6
41 characters long description:
Deliver all WordPress emails via Hectane.

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
Everything looks great! No dangerous files found in this plugin267 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP339104267

PHP code Passed 2 tests

A short review of 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 complexity8.50
▷ Minimum class complexity3.00
▷ Maximum class complexity14.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin