72% category-gallery

Code Review | Category Gallery

WordPress plugin Category Gallery scored72%from 54 tests.

About plugin

  • Plugin page: category-gallery
  • Plugin version: Version (1.1)...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Jul 18, 2015
  • Latest release: Aug 30, 2015
  • Number of updates: 15
  • Update frequency: every 2.9 days
  • Top authors: mrcapture (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,131 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.18ms] Passed 4 tests

Analyzing server-side resources used by Category Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.11 ▼1.59
Dashboard /wp-admin3.31 ▲0.0146.86 ▼3.82
Posts /wp-admin/edit.php3.36 ▲0.0147.59 ▲1.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.67 ▼8.43
Media Library /wp-admin/upload.php3.23 ▲0.0136.57 ▲3.55
Category Gallery /wp-admin/options-general.php?page=Category_Gallery3.1729.61

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
catgal_otoplay
catgal_interval
catgal_enableTitle
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
catgal_enableControls
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Category Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.61 ▼0.742.16 ▲0.3542.98 ▼1.60
Dashboard /wp-admin2,210 ▲225.83 ▼0.0295.58 ▼16.0638.45 ▼0.17
Posts /wp-admin/edit.php2,090 ▲12.01 ▼0.0239.66 ▼0.8633.73 ▼1.66
Add New Post /wp-admin/post-new.php1,545 ▲2318.41 ▼5.13660.35 ▲20.2261.13 ▲5.28
Media Library /wp-admin/upload.php1,392 ▲14.19 ▲0.05114.18 ▲7.4148.05 ▲2.68
Category Gallery /wp-admin/options-general.php?page=Category_Gallery9062.1522.7228.72

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=Category_Gallery
    • > Notice in wp-content/plugins/category-gallery/categorygalery.php+159
    Undefined index: gizli

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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/category-gallery/trunk/categorygalery.php
    • > /wp-content/plugins/category-gallery/categorygalery.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=Category_Gallery
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=Category_Gallery 170:43 Uncaught TypeError: Cannot set properties of null (setting 'value')

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("www.ermanseneren.com/donate")
You can look at the official readme.txt

category-gallery/categorygalery.php 77% from 13 tests

The principal PHP file in "Category Gallery" v. Version (1.1)... is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("category-gallery.php" instead of "categorygalery.php")
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "Version (1.1)...")
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)

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
No dangerous file extensions were detected585 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP35724401
CSS2106182
JavaScript1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
i/50transparent.png0.11KB0.09KB▼ 12.84%
trunk/i/gtk-media-play-ltr.png1.15KB0.33KB▼ 71.56%
i/gtk-media-next-rtl.png1.69KB0.47KB▼ 72.24%
trunk/i/gtk-media-pause.png0.99KB0.14KB▼ 85.57%
trunk/i/gtk-media-next-ltr.png1.98KB0.79KB▼ 59.92%