83% post-category-gallery

Code Review | Post Categories Gallery

WordPress plugin Post Categories Gallery scored83%from 54 tests.

About plugin

  • Plugin page: post-category-gal...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2014
  • Latest release: Feb 27, 2014
  • Number of updates: 4
  • Update frequency: every 3.3 days
  • Top authors: fides-it (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,548 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Post Categories Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.43 ▼0.12
Dashboard /wp-admin3.31 ▲0.0050.15 ▲4.81
Posts /wp-admin/edit.php3.36 ▲0.0044.89 ▼3.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.93 ▼7.17
Media Library /wp-admin/upload.php3.23 ▲0.0033.46 ▼1.66

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Categories Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.58 ▼0.801.79 ▲0.1745.51 ▲0.93
Dashboard /wp-admin2,206 ▲155.80 ▼0.11100.08 ▼4.4939.43 ▼3.74
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0437.64 ▲0.1432.36 ▼1.48
Add New Post /wp-admin/post-new.php1,542 ▲2118.58 ▼4.46653.50 ▼25.9357.77 ▼1.15
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0196.53 ▲0.6543.48 ▼3.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/post-category-gallery/horcatbar.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Green color scheme. `/trunk/screenshot-1.png`), #2 (Blue color scheme. `/trunk/screenshot-2.png`), #3 (Brown color scheme. `/trunk/screenshot-3.png`)
Please take inspiration from this readme.txt

post-category-gallery/horcatbar.php 92% from 13 tests

The principal PHP file in "Post Categories Gallery" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-category-gallery.php" instead of "horcatbar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected314 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1241241
PHP1253573

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity6.00
▷ Minimum method complexity6.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 1.07MB with 0.63MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png375.18KB124.16KB▼ 66.91%
screenshot-1.png359.77KB123.90KB▼ 65.56%
not_available.png3.21KB1.99KB▼ 38.13%
screenshot-3.png357.20KB123.70KB▼ 65.37%