99% wpematico-custom-hooks

Code Review | WPeMatico Custom Hooks

WordPress plugin WPeMatico Custom Hooks scored 99% from 54 tests.

About plugin

  • Plugin page: wpematico-custom-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.7.1
  • WordPress version: 5.8.1
  • First release: Aug 28, 2017
  • Latest release: Apr 30, 2021
  • Number of updates: 12
  • Update frequency: every 111.8 days
  • Top authors: etruel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 4,249 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by WPeMatico Custom Hooks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1233.59 ▲11.98
Dashboard /wp-admin3.06 ▲0.0049.06 ▼2.95
Posts /wp-admin/edit.php3.11 ▲0.0046.24 ▼2.45
Add New Post /wp-admin/post-new.php5.42 ▼0.02105.32 ▼561.50
Media Library /wp-admin/upload.php3.00 ▲0.0036.12 ▲2.76

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WPeMatico Custom Hooks: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10716.14 ▲0.239.30 ▼1.7244.58 ▼5.76
Dashboard /wp-admin2,992 ▲645.99 ▼0.01154.90 ▼25.50123.20 ▼2.51
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0173.24 ▼0.1592.38 ▼2.83
Add New Post /wp-admin/post-new.php1,683 ▲18318.76 ▼0.02407.83 ▼0.34121.16 ▲11.97
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.05163.44 ▲5.13114.79 ▲0.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #1 (Settings page. Fields to fill.) image missing
Please take inspiration from this readme.txt

wpematico-custom-hooks/wpematico_custom-hooks.php 92% from 13 tests

The primary PHP file in "WPeMatico Custom Hooks" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpematico-custom-hooks.php" instead of "wpematico_custom-hooks.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin12,723 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript151,1471,18610,726
PHP71112431,436
CSS87430498
Markdown128063

PHP code Passed 2 tests

This is a very shot 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.37
Average class complexity15.20
▷ Minimum class complexity5.00
▷ Maximum class complexity37.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1885.71%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
4 PNG files occupy 0.18MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png47.23KB23.52KB▼ 50.20%
screenshot-2.png46.45KB21.95KB▼ 52.74%
screenshot-3.png37.65KB19.21KB▼ 48.97%
screenshot-1.png53.27KB31.49KB▼ 40.89%