78% simple-media-taxonomy-galleries

Code Review | Automatic Galleries

WordPress plugin Automatic Galleries scored78%from 54 tests.

About plugin

  • Plugin page: simple-media-taxo...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Jun 5, 2019
  • Number of updates: 5
  • Update frequency: every 232.2 days
  • Top authors: nomadcoder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,084 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.64ms] Passed 4 tests

A check of server-side resources used by Automatic Galleries
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1548.19 ▲3.75
Dashboard /wp-admin3.47 ▲0.1654.59 ▲5.53
Posts /wp-admin/edit.php3.56 ▲0.2156.48 ▲5.38
Add New Post /wp-admin/post-new.php6.05 ▲0.1688.35 ▼12.11
Media Library /wp-admin/upload.php3.39 ▲0.1642.94 ▲8.21
Automatic Media Galleries /wp-admin/options-general.php?page=simple-media-Galleries3.3638.77

Server storage [IO: ▲0.08MB] [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, 7 new options
New WordPress options
simple_media_gallery_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Automatic Galleries
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.091.65 ▼0.2841.64 ▼3.89
Dashboard /wp-admin2,193 ▲195.56 ▼0.0688.93 ▼3.0941.97 ▼0.55
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0139.20 ▼0.1139.55 ▲2.47
Add New Post /wp-admin/post-new.php1,557 ▲3123.41 ▲5.75673.56 ▼39.0958.58 ▼0.99
Media Library /wp-admin/upload.php1,401 ▲14.20 ▼0.01100.41 ▼16.3143.78 ▼3.17
Automatic Media Galleries /wp-admin/options-general.php?page=simple-media-Galleries9271.8128.2830.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • simple_media_gallery_options

Smoke tests 50% 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 0% from 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 following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-media-taxonomy-galleries/simple-media-galleries-admin.php
    • > /wp-content/plugins/simple-media-taxonomy-galleries/simple-media-galleries.php
    • > /wp-content/plugins/simple-media-taxonomy-galleries/simple-media-galleries-tags.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-media-taxonomy-galleries/templates/taxonomy-photo_category.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-media-taxonomy-galleries === )
Please take inspiration from this readme.txt

simple-media-taxonomy-galleries/simple-media-galleries.php 92% from 13 tests

"Automatic Galleries" version 2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-media-taxonomy-galleries.php" instead of "simple-media-galleries.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 detected948 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4185172811
JavaScript22211137

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity30.75
▷ Minimum class complexity6.00
▷ Maximum class complexity64.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods722.58%
▷ Public methods2993.55%
▷ Protected methods13.23%
▷ Private methods13.23%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin