73% vignete-ads

Code Review | Vignette Ads

WordPress plugin Vignette Ads scored73%from 54 tests.

About plugin

  • Plugin page: vignete-ads
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1
  • WordPress version: 6.3.1
  • First release: May 4, 2016
  • Latest release: Feb 28, 2019
  • Number of updates: 10
  • Update frequency: every 103.1 days
  • Top authors: topplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,686 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼39.83ms] Passed 4 tests

This is a short check of server-side resources used by Vignette Ads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0725.19 ▼21.32
Dashboard /wp-admin3.00 ▼0.3124.09 ▼32.47
Posts /wp-admin/edit.php3.00 ▼0.3629.06 ▼22.17
Add New Post /wp-admin/post-new.php3.00 ▼2.8926.36 ▼83.36
Media Library /wp-admin/upload.php3.00 ▼0.2325.92 ▼14.01

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Vignette Ads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.27 ▼0.081.90 ▲0.1638.99 ▼4.13
Dashboard /wp-admin2,193 ▲135.63 ▼0.0396.64 ▲4.2942.72 ▲0.40
Posts /wp-admin/edit.php2,107 ▲102.02 ▲0.0137.15 ▲0.6036.75 ▼5.88
Add New Post /wp-admin/post-new.php1,529 ▲323.02 ▼0.11691.20 ▼1.6067.26 ▲17.79
Media Library /wp-admin/upload.php1,407 ▲74.10 ▼0.03103.06 ▲2.9142.74 ▲0.32
Vignette Ads /wp-admin/options-general.php?page=Vignette Ads8081.9627.3431.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • headcodes
    • widget_recent-comments

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/vignete-ads/Admin.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vignete-ads/vignetteads.php:28

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: Please describe screenshot #1 in vignete-ads/assets to your readme.txt
  • Tags: You are using too many tags: 22 tag instead of maximum 10
Please take inspiration from this readme.txt

vignete-ads/vignetteads.php 92% from 13 tests

The main PHP script in "Vignette Ads" version 0.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("vignete-ads.php" instead of "vignetteads.php")

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
Everything looks great! No dangerous files found in this plugin62 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2111762

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.60
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin