83% gallery-image-content-post

Code Review | Gallery Image Content Post

WordPress plugin Gallery Image Content Post scored83%from 54 tests.

About plugin

  • Plugin page: gallery-image-con...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: May 1, 2015
  • Latest release: Apr 7, 2016
  • Number of updates: 21
  • Update frequency: every 16.3 days
  • Top authors: bboy8k (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,987 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.04MB] [CPU: ▼8.32ms] Passed 4 tests

Analyzing server-side resources used by Gallery Image Content Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.08 ▼5.27
Dashboard /wp-admin3.34 ▲0.0445.15 ▼7.16
Posts /wp-admin/edit.php3.40 ▲0.0447.37 ▼0.45
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.34 ▼20.40
Media Library /wp-admin/upload.php3.27 ▲0.0435.88 ▲1.07
Gallery Image Content /wp-admin/options-general.php?page=gallery-image-content3.2433.01

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
gallery_image_content
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Gallery Image Content Post
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15813.91 ▼0.4911.04 ▲8.8638.95 ▼10.47
Dashboard /wp-admin2,207 ▲165.81 ▲0.90103.33 ▼3.3741.69 ▼3.22
Posts /wp-admin/edit.php2,096 ▲72.03 ▲0.0338.26 ▲3.1339.00 ▲2.15
Add New Post /wp-admin/post-new.php1,529 ▲1523.45 ▲5.79633.71 ▲28.4773.51 ▲20.53
Media Library /wp-admin/upload.php1,386 ▲14.30 ▲0.0394.30 ▼6.0740.71 ▼3.02
Gallery Image Content /wp-admin/options-general.php?page=gallery-image-content8582.0525.2929.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • gallery_image_content
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gallery-image-content-post/inc/plugin-form.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please a description for screenshot #4 in gallery-image-content-post/assets to your readme.txt
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

gallery-image-content-post/gallery-image-content.php 85% from 13 tests

"Gallery Image Content Post" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("gallery-image-content-post.php" instead of "gallery-image-content.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin678 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS1827458
PHP240132144
PO File1142846
JavaScript24630

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin