84% wp-post-gallery-fancybox

Code Review | WP Post Gallery Fancybox

WordPress plugin WP Post Gallery Fancybox scored84%from 54 tests.

About plugin

  • Plugin page: wp-post-gallery-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.3-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 31, 2018
  • Latest release: Nov 5, 2018
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: ajmaurya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /792 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by WP Post Gallery Fancybox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.34 ▼2.86
Dashboard /wp-admin3.32 ▲0.0148.35 ▼13.58
Posts /wp-admin/edit.php3.37 ▲0.0149.79 ▼2.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.72 ▼9.04
Media Library /wp-admin/upload.php3.24 ▲0.0137.35 ▼1.37

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

How much does this plugin use your filesystem and database?
This 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_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Post Gallery Fancybox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.30 ▼0.994.44 ▲1.8342.81 ▼2.42
Dashboard /wp-admin2,206 ▲184.85 ▼1.03105.42 ▼13.2643.63 ▲0.91
Posts /wp-admin/edit.php2,089 ▲32.06 ▲0.0237.13 ▼0.3734.91 ▲1.90
Add New Post /wp-admin/post-new.php1,534 ▲123.14 ▲0.41669.19 ▲40.8757.59 ▲9.00
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.04103.06 ▼2.4445.44 ▼0.22

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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/wp-post-gallery-fancybox/wp-post-gallery-fancybox.php:16

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: lightbox gallery, fancybox 3, gallery slideshow, wordpress gallery, wordpress fancybox gallery...

wp-post-gallery-fancybox/wp-post-gallery-fancybox.php Passed 13 tests

Analyzing the main PHP file in "WP Post Gallery Fancybox" version 1.0.0
121 characters long description:
WP Post Gallery Fancybox is a WordPress plugin that converts the default WordPress Media Gallery into a Fancybox Gallery.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,907 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15101,138
CSS21211740
PHP191729

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin