94% adquire

Code Review | AdQuire

WordPress plugin AdQuire scored 94% from 54 tests.

About plugin

  • Plugin page: adquire
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.2-4.5.2
  • WordPress version: 5.9.2
  • First release: Jul 6, 2016
  • Latest release: Feb 2, 2017
  • Number of updates: 11
  • Update frequency: every 19.6 days
  • Top authors: bprat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 783 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.31MB] [CPU: ▼308.75ms] Passed 4 tests

This is a short check of server-side resources used by AdQuire
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0151.76 ▲2.11
Dashboard /wp-admin3.30 ▼0.1021.79 ▼12.18
Posts /wp-admin/edit.php3.36 ▼0.2824.59 ▼13.40
Add New Post /wp-admin/post-new.php6.10 ▼0.8778.07 ▼1,201.99
Media Library /wp-admin/upload.php3.31 ▲0.0219.46 ▼7.42

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for AdQuire
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲4416.28 ▲0.245.79 ▼0.262.47 ▲0.25
Dashboard /wp-admin2,916 ▲556.07 ▼0.18122.47 ▼14.68177.15 ▲19.53
Posts /wp-admin/edit.php2,712 ▲403.26 ▲0.0263.77 ▼1.36141.33 ▼0.63
Add New Post /wp-admin/post-new.php1,678 ▼1215.48 ▼6.11422.57 ▼22.02170.90 ▲13.81
Media Library /wp-admin/upload.php1,720 ▲225.58 ▲0.04124.67 ▼12.53207.72 ▲21.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/adquire/adquire.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adquire/includes/embed-adquire.php:149
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adquire/includes/admin-page.php:618
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adquire/includes/scripts.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === adquire === )
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

adquire/adquire.php Passed 13 tests

Analyzing the main PHP file in "AdQuire" version 1.4
129 characters long description:
Allows WordPress webpage owners to set up AdQuire easily. To get started: 1) Click the 'Activate' link; 2) Click the AdQuire tab.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,069 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP54077791
JavaScript41740159
CSS2260108
HTML10011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions11100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/adq-logo.png1.19KB0.95KB▼ 20.66%
includes/images/adquire.png0.82KB0.93KB0.00%