84% photopress-masonry-gallery

Code Review | PhotoPress - Masonry Gallery

WordPress plugin PhotoPress - Masonry Gallery scored 84% from 54 tests.

About plugin

  • Plugin page: photopress-masonr...
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.3
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: Mar 23, 2018
  • Number of updates: 28
  • Update frequency: every 54.7 days
  • Top authors: padams (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

60+ active / 10,266 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.02MB] [CPU: ▼3.96ms] Passed 4 tests

This is a short check of server-side resources used by PhotoPress - Masonry Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.84 ▼1.65
Dashboard /wp-admin3.32 ▲0.0248.15 ▼0.50
Posts /wp-admin/edit.php3.38 ▲0.0243.26 ▼4.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.85 ▼9.11
Media Library /wp-admin/upload.php3.25 ▲0.0235.41 ▼0.98

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PhotoPress - Masonry Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲5313.27 ▼1.101.62 ▼0.3936.98 ▼1.42
Dashboard /wp-admin2,213 ▲255.82 ▼0.0798.69 ▼3.0639.17 ▼0.48
Posts /wp-admin/edit.php2,099 ▲72.06 ▲0.0234.06 ▼6.2632.84 ▼1.31
Add New Post /wp-admin/post-new.php1,547 ▲3323.29 ▲5.70674.45 ▲14.8457.46 ▲12.93
Media Library /wp-admin/upload.php1,395 ▲104.19 ▼0.0793.62 ▼1.5741.37 ▼0.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/photopress-masonry-gallery/photopress-masonry-gallery.php:198

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: photopress, images, gallery, photos, tiled...

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

Analyzing the main PHP file in "PhotoPress - Masonry Gallery" version 1.2.8
66 characters long description:
Adds a Masonry gallery presentation to the core gallery shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected178 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1476193
JavaScript3342463
CSS112122

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin