84% adquire

Code Review | AdQuire

WordPress plugin AdQuire scored84%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: 6.3.1
  • 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 /915 total downloads

Benchmarks

Plugin footprint 83% 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.20MB] [CPU: ▼20.55ms] Passed 4 tests

Analyzing server-side resources used by AdQuire
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0723.62 ▼17.40
Dashboard /wp-admin3.12 ▼0.1931.45 ▼17.95
Posts /wp-admin/edit.php3.25 ▼0.1134.51 ▼18.12
Add New Post /wp-admin/post-new.php5.44 ▼0.4467.88 ▼28.71
Media Library /wp-admin/upload.php3.18 ▼0.0432.07 ▼3.77

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by AdQuire
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.32 ▼1.053.79 ▲1.8840.46 ▼5.01
Dashboard /wp-admin2,210 ▲225.90 ▼0.0198.29 ▼12.9782.04 ▲41.08
Posts /wp-admin/edit.php2,108 ▲192.04 ▲0.0134.82 ▼6.5834.14 ▼2.67
Add New Post /wp-admin/post-new.php1,694 ▲16124.91 ▲1.70690.31 ▲0.0446.56 ▼6.99
Media Library /wp-admin/upload.php1,401 ▲134.44 ▲0.1694.25 ▼11.6182.64 ▲38.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > 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/scripts.php:26
    • > 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

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === adquire === )
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

adquire/adquire.php Passed 13 tests

The principal PHP file in "AdQuire" v. 1.4 is loaded by WordPress automatically on each request
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 | Executable files are considered dangerous and should not be included with any WordPress plugin
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

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
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%