94% hextwo-category-sanity

Code Review | HEXTWO Category Sanity

WordPress plugin HEXTWO Category Sanity scored 94% from 54 tests.

About plugin

  • Plugin page: hextwo-category-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 5.9.2
  • First release: Feb 13, 2018
  • Latest release: Feb 13, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: DaneMorgan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 380 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼297.97ms] Passed 4 tests

Analyzing server-side resources used by HEXTWO Category Sanity
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0158.05 ▲0.17
Dashboard /wp-admin3.42 ▲0.0135.58 ▼7.49
Posts /wp-admin/edit.php3.65 ▲0.0145.31 ▲2.93
Add New Post /wp-admin/post-new.php6.89 ▼0.09104.69 ▼1,184.10
Media Library /wp-admin/upload.php3.30 ▲0.0030.00 ▼0.46

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for HEXTWO Category Sanity
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5315.84 ▲0.165.89 ▼1.022.84 ▲0.68
Dashboard /wp-admin2,895 ▲376.13 ▼0.19116.42 ▼14.43153.86 ▼7.14
Posts /wp-admin/edit.php2,657 ▼343.25 ▲0.0065.41 ▲0.82137.89 ▼8.16
Add New Post /wp-admin/post-new.php1,663 ▼8916.10 ▼4.77411.73 ▼56.36149.69 ▼2.37
Media Library /wp-admin/upload.php1,698 ▼05.57 ▲0.05143.43 ▼0.40190.26 ▲6.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 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 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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hextwo-category-sanity/hextwo-category-sanity.php:35

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: uncategorized, publishing, categories

hextwo-category-sanity/hextwo-category-sanity.php 92% from 13 tests

The main PHP script in "HEXTWO Category Sanity" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected53 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16737
Markdown1408
PHP110308

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected