10% random-ads-by-aarvis

Code Review | Random Ads by Aarvis

WordPress plugin Random Ads by Aarvis scored 10% from 54 tests.

About plugin

  • Plugin page: random-ads-by-aarvis
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.1
  • WordPress version: 5.8.1
  • First release: Mar 14, 2017
  • Latest release: Dec 22, 2017
  • Number of updates: 24
  • Update frequency: every 11.4 days
  • Top authors: subhash76 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 685 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/random-ads-by-aarvis/random-ads-by-aarvis.php+22
    Undefined variable: STP_charset_collate

Server metrics [RAM: ▼1.75MB] [CPU: ▼194.58ms] Passed 4 tests

An overview of server-side resources used by Random Ads by Aarvis
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼0.847.58 ▼14.02
Dashboard /wp-admin1.90 ▼1.169.24 ▼36.81
Posts /wp-admin/edit.php1.90 ▼1.225.46 ▼48.59
Add New Post /wp-admin/post-new.php1.90 ▼3.535.35 ▼663.02
Media Library /wp-admin/upload.php1.90 ▼1.104.86 ▼29.91

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: 1 new table, 6 new options
New tables
wp_RAA_Ad_Units
New WordPress options
RAA_show_cnt
RAA_LetterCount
RAA_ParaCount
RAA_ChkRandom
RAA_Show_Mod
RAA_DbVesion

Browser metrics Passed 4 tests

An overview of browser requirements for Random Ads by Aarvis
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,705 ▲5916.29 ▲0.8010.07 ▲1.1447.64 ▼2.05
Dashboard /wp-admin2,989 ▲525.90 ▼0.08147.56 ▼17.21119.35 ▼13.36
Posts /wp-admin/edit.php2,761 ▲222.71 ▲0.0271.13 ▼3.2695.46 ▲4.68
Add New Post /wp-admin/post-new.php1,698 ▲1518.71 ▲0.23398.77 ▼2.27120.78 ▲4.47
Media Library /wp-admin/upload.php1,829 ▲225.01 ▼0.00149.13 ▼0.47125.95 ▼1.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the RAA_Style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • RAA_DbVesion

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/random-ads-by-aarvis/random-ads-by-aarvis.php:107

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The plugin Menu), #2 (Insert Ads in Ad blocks.)
Please take inspiration from this readme.txt

random-ads-by-aarvis/random-ads-by-aarvis.php Passed 13 tests

The main file in "Random Ads by Aarvis" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
120 characters long description:
This is a simple plugin to insert Ads to your website. As the name says you can show random Ads within your post content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin386 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17520336
CSS16050

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png32.10KB18.51KB▼ 42.34%
screenshot-2.png40.07KB18.55KB▼ 53.70%