72% adsoptimal

Code Review | Mobile Ad for Wordpress by AdsOptimal

WordPress plugin Mobile Ad for Wordpress by AdsOptimal scored72%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: 6.3.1
  • 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 /10,003 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼9.28ms] Passed 4 tests

Server-side resources used by Mobile Ad for Wordpress by AdsOptimal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.30 ▲1.22
Dashboard /wp-admin3.40 ▲0.0948.57 ▼9.86
Posts /wp-admin/edit.php3.51 ▲0.1546.58 ▼0.38
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.64 ▼28.11
Media Library /wp-admin/upload.php3.32 ▲0.0935.51 ▲3.97
AdsOptimal /wp-admin/options-general.php?page=adsoptimal3.3234.10

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mobile Ad for Wordpress by AdsOptimal
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.59 ▼0.815.20 ▲3.2737.55 ▼5.86
Dashboard /wp-admin2,207 ▲285.88 ▲1.03114.91 ▼17.7739.67 ▼20.52
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0441.02 ▲2.1435.24 ▼10.45
Add New Post /wp-admin/post-new.php1,517 ▼217.74 ▼5.44657.89 ▼66.4852.43 ▼0.05
Media Library /wp-admin/upload.php1,395 ▲44.22 ▲0.0298.33 ▼3.4142.91 ▼0.34
AdsOptimal /wp-admin/options-general.php?page=adsoptimal8991.6930.8477.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/adsoptimal/public/views/public.php
  • 1× 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/adsoptimal/admin/views/admin.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > 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)
    http://www.adsoptimal.com/assets/theme-v2/white-logo.png - 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 ()

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Screenshots: Screenshot #5 (Work across all devices.) image missing
You can take inspiration from this 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:
  • Description: Please keep the plugin description shorter than 140 characters (currently 224 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin699 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7131474605
CSS2101144
Markdown120044
JavaScript2466

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods829.63%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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