84% home-categories

Code Review | Home Categories

WordPress plugin Home Categories scored84%from 54 tests.

About plugin

  • Plugin page: home-categories
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: May 23, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: msng (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /8,384 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.18ms] Passed 4 tests

This is a short check of server-side resources used by Home Categories
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.06 ▼0.55
Dashboard /wp-admin3.34 ▲0.0445.90 ▼0.42
Posts /wp-admin/edit.php3.39 ▲0.0445.89 ▼2.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.57 ▲3.19
Media Library /wp-admin/upload.php3.27 ▲0.0438.37 ▲3.45
Home Categories /wp-admin/options-general.php?page=home-categories/home-categories.php3.2435.27

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Home Categories
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4813.24 ▼1.051.71 ▼0.6142.29 ▼6.19
Dashboard /wp-admin2,214 ▲234.89 ▼0.9799.80 ▼7.4336.55 ▼8.69
Posts /wp-admin/edit.php2,094 ▲52.01 ▼0.0038.86 ▼0.5334.23 ▼3.39
Add New Post /wp-admin/post-new.php1,534 ▲1523.16 ▼0.19665.45 ▼21.5060.48 ▲10.10
Media Library /wp-admin/upload.php1,387 ▼14.19 ▲0.00101.66 ▼4.7543.59 ▲0.40
Home Categories /wp-admin/options-general.php?page=home-categories/home-categories.php7962.0425.5929.37

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/home-categories/home-categories.php:54

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: "none"
You can look at the official readme.txt

home-categories/home-categories.php Passed 13 tests

This is the main PHP file of "Home Categories" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
57 characters long description:
Filters the categories of posts shown on your front page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin261 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34925207
PO File1172743
CSS13011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods642.86%
▷ Protected methods857.14%
▷ Private methods00.00%
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
No PNG images were found in this plugin