84% gallery-from-regex-matches

Code Review | Gallery From Regex Matches

WordPress plugin Gallery From Regex Matches scored84%from 54 tests.

About plugin

  • Plugin page: gallery-from-rege...
  • Plugin version: 0.6.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2018
  • Latest release: May 30, 2019
  • Number of updates: 30
  • Update frequency: every 16.9 days
  • Top authors: doddo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /896 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.00MB] [CPU: ▼10.32ms] Passed 4 tests

This is a short check of server-side resources used by Gallery From Regex Matches
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.03 ▼11.38
Dashboard /wp-admin3.32 ▼0.0353.38 ▼13.56
Posts /wp-admin/edit.php3.38 ▲0.0159.62 ▲1.86
Add New Post /wp-admin/post-new.php5.91 ▲0.01100.79 ▼8.34
Media Library /wp-admin/upload.php3.25 ▲0.0136.56 ▼8.00

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gallery From Regex Matches
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.86 ▼0.2442.60 ▲0.25
Dashboard /wp-admin2,195 ▲245.61 ▼0.0592.49 ▼5.4241.07 ▼3.18
Posts /wp-admin/edit.php2,100 ▼31.96 ▲0.0141.32 ▲0.0537.86 ▲0.54
Add New Post /wp-admin/post-new.php1,531 ▲523.15 ▼0.25636.27 ▼13.4556.15 ▲0.40
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.0299.44 ▼6.0144.66 ▼2.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gallery-from-regex-matches/gallery-from-regex-matches.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: gallery

gallery-from-regex-matches/gallery-from-regex-matches.php Passed 13 tests

The primary PHP file in "Gallery From Regex Matches" version 0.6.3 is used by WordPress to initiate all plugin functionality
121 characters long description:
Maintain a gallery by including all published images in your library which match a regex (in name, title or description).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1164567

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity7.00
▷ Minimum method complexity3.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods150.00%
▷ Protected methods00.00%
▷ Private methods150.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin