84% photopress-gallery

Code Review | PhotoPress - Gallery

WordPress plugin PhotoPress - Gallery scored84%from 54 tests.

About plugin

  • Plugin page: photopress-gallery
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.3
  • WordPress version: 6.3.1
  • First release: Jan 11, 2012
  • Latest release: Mar 23, 2018
  • Number of updates: 37
  • Update frequency: every 61.5 days
  • Top authors: padams (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /10,508 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.36ms] Passed 4 tests

Analyzing server-side resources used by PhotoPress - Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.56 ▼2.74
Dashboard /wp-admin3.35 ▲0.0049.29 ▼20.24
Posts /wp-admin/edit.php3.40 ▲0.0449.21 ▼1.80
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.18 ▼4.65
Media Library /wp-admin/upload.php3.27 ▲0.0439.19 ▲3.30

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for PhotoPress - Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.73 ▲0.402.22 ▲0.2539.98 ▼5.97
Dashboard /wp-admin2,195 ▲185.63 ▼0.0888.68 ▼3.4438.27 ▼4.62
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0234.98 ▼7.6434.04 ▼4.51
Add New Post /wp-admin/post-new.php1,545 ▲523.44 ▲5.02654.72 ▲38.2055.64 ▼0.61
Media Library /wp-admin/upload.php1,397 ▼64.20 ▲0.01108.39 ▲5.7945.89 ▲2.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/photopress-gallery/photopress-gallery.php:447

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: Add an image for screenshot #1 (Taxonomy and Term Shortcode Usage)
You can look at the official readme.txt

photopress-gallery/photopress-gallery.php Passed 13 tests

"PhotoPress - Gallery" version 1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
56 characters long description:
Adds taxonomy query parameters to the gallery shortcode.

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
Success! There were no dangerous files found in this plugin647 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP19095270
JavaScript47748237
CSS1265140

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.49KB10.76KB▼ 54.19%
screenshot-2.png25.31KB12.12KB▼ 52.12%