78% wp-ad-gallery

Code Review | WP AD Gallery

WordPress plugin WP AD Gallery scored 78% from 54 tests.

About plugin

  • Plugin page: wp-ad-gallery
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Apr 18, 2012
  • Latest release: Jun 18, 2012
  • Number of updates: 60
  • Update frequency: every 1.0 days
  • Top authors: wiellyam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 11,305 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.01MB] [CPU: ▼8.52ms] Passed 4 tests

A check of server-side resources used by WP AD Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.30 ▼26.73
Dashboard /wp-admin3.31 ▲0.0155.37 ▼2.03
Posts /wp-admin/edit.php3.36 ▲0.0150.75 ▼2.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0199.07 ▼2.71
Media Library /wp-admin/upload.php3.23 ▲0.0140.56 ▲1.45

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP AD Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲11513.82 ▲0.3111.15 ▲8.5338.34 ▼10.88
Dashboard /wp-admin2,206 ▲35.85 ▲0.05104.51 ▲5.4548.90 ▲10.40
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0439.55 ▲3.3035.72 ▲0.88
Add New Post /wp-admin/post-new.php1,533 ▲523.60 ▲5.47726.68 ▲76.6850.92 ▼16.29
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.08106.40 ▲8.4651.69 ▲9.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-ad-gallery/tinymce/tinymce.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-ad-gallery/wp-ad-gallery.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-ad-gallery/shortcode/shortcode.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Shortcode Option), #4 (WP AD Gallery)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-ad-gallery === )
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

wp-ad-gallery/wp-ad-gallery.php Passed 13 tests

This is the main PHP file of "WP AD Gallery" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
AD Gallery jQuery plugin for Wordpress

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
Success! There were no dangerous files found in this plugin505 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21229279
PHP36348226

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ad_scroll_back.png0.23KB0.17KB▼ 29.17%
images/ad_next.png0.35KB0.26KB▼ 25.35%
images/opa75.png0.11KB0.09KB▼ 13.64%
images/ad_scroll_forward.png0.23KB0.16KB▼ 28.63%
tinymce/images/button.png0.70KB0.61KB▼ 13.31%