84% post-format-gallery-widget

Code Review | Post Format Gallery Widget

WordPress plugin Post Format Gallery Widget scored84%from 54 tests.

About plugin

  • Plugin page: post-format-galle...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Oct 10, 2013
  • Latest release: Oct 23, 2013
  • Number of updates: 5
  • Update frequency: every 2.6 days
  • Top authors: eduardozulian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,177 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.61ms] Passed 4 tests

Analyzing server-side resources used by Post Format Gallery Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.12 ▲2.68
Dashboard /wp-admin3.37 ▲0.0749.46 ▼6.28
Posts /wp-admin/edit.php3.42 ▲0.0748.96 ▼4.77
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.50 ▼17.65
Media Library /wp-admin/upload.php3.30 ▲0.0738.34 ▲2.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_post-format-gallery-widget
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Post Format Gallery Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.311.98 ▲0.2844.09 ▲0.37
Dashboard /wp-admin2,198 ▲185.65 ▼0.0091.54 ▲0.9740.55 ▼1.72
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0040.63 ▲3.9634.94 ▲1.42
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▲0.05672.40 ▲3.7953.99 ▲1.03
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.0393.57 ▼11.0943.08 ▼4.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_post-format-gallery-widget
    • can_compress_scripts
    • widget_theysaidso_widget

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-format-gallery-widget/post-format-gallery-widget.php:36

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: widget, gallery, post format gallery, sidebar, images...

post-format-gallery-widget/post-format-gallery-widget.php Passed 13 tests

The principal PHP file in "Post Format Gallery Widget" v. 1.1 is loaded by WordPress automatically on each request
71 characters long description:
Display images from your galleries saved under the post format Gallery.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin404 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP18359268
PO File1242158
Markdown118053
JavaScript115825

PHP code Passed 2 tests

A short 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.38
Average class complexity60.00
▷ Minimum class complexity60.00
▷ Maximum class complexity60.00
Average method complexity12.80
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.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