82% adsoptimal

Code Review | Mobile Ad for Wordpress by AdsOptimal

WordPress plugin Mobile Ad for Wordpress by AdsOptimal scored 82% from 54 tests.

About plugin

  • Plugin page: adsoptimal
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.1.1
  • WordPress version: 5.9.2
  • First release: Jul 15, 2014
  • Latest release: Apr 22, 2016
  • Number of updates: 70
  • Update frequency: every 9.2 days
  • Top authors: sakares (67.14%)baddth (34.29%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active / 9,672 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼250.38ms] Passed 4 tests

An overview of server-side resources used by Mobile Ad for Wordpress by AdsOptimal
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0263.75 ▲5.94
Dashboard /wp-admin3.44 ▲0.0437.99 ▲0.16
Posts /wp-admin/edit.php3.67 ▲0.0340.87 ▲1.02
Add New Post /wp-admin/post-new.php6.90 ▼0.07249.20 ▼1,002.15
Media Library /wp-admin/upload.php3.32 ▲0.0226.21 ▼0.53
AdsOptimal /wp-admin/options-general.php?page=adsoptimal3.3728.45

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Mobile Ad for Wordpress by AdsOptimal
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,877 ▲13516.54 ▲0.739.56 ▲3.132.35 ▲0.24
Dashboard /wp-admin2,894 ▲336.17 ▼0.03119.16 ▼16.29156.07 ▼10.56
Posts /wp-admin/edit.php2,693 ▲23.23 ▼0.0065.97 ▲3.18138.56 ▼9.25
Add New Post /wp-admin/post-new.php1,776 ▲11521.64 ▲4.65419.07 ▲0.06162.50 ▲10.58
Media Library /wp-admin/upload.php1,703 ▲55.51 ▼0.00142.36 ▲6.20186.01 ▼0.83
AdsOptimal /wp-admin/options-general.php?page=adsoptimal1,1642.6256.54116.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 25% 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 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/adsoptimal/public/views/public.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/adsoptimal/admin/views/admin.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=adsoptimal
    • > Network (severe)
    http://www.adsoptimal.com/redirect-assets/application.v3.css - Failed to load resource: the server responded with a status of 530 ()
    • > GET request to /wp-admin/options-general.php?page=adsoptimal
    • > Network (severe)
    http://www.adsoptimal.com/redirect-assets/customer.v3.css - Failed to load resource: the server responded with a status of 530 ()
    • > GET request to /wp-admin/options-general.php?page=adsoptimal
    • > Network (severe)
    https://cdn.adsoptimal.com/assets/theme-v3/herounit.bg.topbar.png - Failed to load resource: the server responded with a status of 503 ()
    • > GET request to /wp-admin/options-general.php?page=adsoptimal
    • > Network (severe)
    http://www.adsoptimal.com/assets/theme-v2/white-logo.png - Failed to load resource: the server responded with a status of 530 ()


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #5 (Work across all devices.)
You can look at the official readme.txt

adsoptimal/adsoptimal.php 85% from 13 tests

The main file in "Mobile Ad for Wordpress by AdsOptimal" v. 1.4.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 224 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin699 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods829.63%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
▷ Named functions5100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/white-logo.png4.32KB2.98KB▼ 31.12%