99% lh-taxonomy-pinned-posts

Code Review | LH Taxonomy Pinned Posts

WordPress plugin LH Taxonomy Pinned Posts scored 99% from 54 tests.

About plugin

  • Plugin page: lh-taxonomy-pinne...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2
  • WordPress version: 5.8.1
  • First release: Aug 28, 2019
  • Latest release: Aug 28, 2019
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 331 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼138.89ms] Passed 4 tests

This is a short check of server-side resources used by LH Taxonomy Pinned Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1735.20 ▲14.55
Dashboard /wp-admin3.11 ▲0.0652.12 ▲2.32
Posts /wp-admin/edit.php3.20 ▲0.0943.79 ▼2.25
Add New Post /wp-admin/post-new.php5.56 ▲0.1295.57 ▼558.44
Media Library /wp-admin/upload.php3.06 ▲0.0538.62 ▲2.83
Pinnable Posts /wp-admin/edit.php?post_type=lh_tpps-post_type3.1034.70

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

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

Browser metrics Passed 4 tests

A check of browser resources used by LH Taxonomy Pinned Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,692 ▲9616.27 ▲0.688.31 ▼2.2553.77 ▼0.79
Dashboard /wp-admin2,982 ▲455.91 ▼0.02146.56 ▼9.42116.88 ▲9.90
Posts /wp-admin/edit.php2,748 ▲92.69 ▲0.0071.17 ▲3.0586.55 ▼10.82
Add New Post /wp-admin/post-new.php1,504 ▼17918.82 ▲0.09390.80 ▼8.38109.93 ▼4.04
Media Library /wp-admin/upload.php1,819 ▲95.02 ▲0.01157.39 ▼5.07126.52 ▼1.76
Pinnable Posts /wp-admin/edit.php?post_type=lh_tpps-post_type1,4172.6264.4175.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: sticky, pinned, post, categories, archive...

lh-taxonomy-pinned-posts/lh-taxonomy-pinned-posts.php 85% from 13 tests

This is the main PHP file of "LH Taxonomy Pinned Posts" version 1.00, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected187 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP217848187

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods743.75%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin