89% purpleads

Code Review | PurpleAds Ad Network

WordPress plugin PurpleAds Ad Network scored89%from 54 tests.

About plugin

  • Plugin page: purpleads
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 19, 2023
  • Latest release: Mar 6, 2023
  • Number of updates: 6
  • Update frequency: every 3.0 days
  • Top authors: purpleads (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.64ms] Passed 4 tests

An overview of server-side resources used by PurpleAds Ad Network
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.44 ▼0.18
Dashboard /wp-admin3.31 ▲0.0146.45 ▼9.54
Posts /wp-admin/edit.php3.36 ▲0.0147.27 ▼5.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.26 ▼12.53
Media Library /wp-admin/upload.php3.24 ▲0.0132.74 ▼2.63

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PurpleAds Ad Network
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.42 ▲0.141.93 ▲0.2743.37 ▲3.06
Dashboard /wp-admin2,218 ▲475.79 ▲0.1587.09 ▼2.9739.32 ▼1.98
Posts /wp-admin/edit.php2,123 ▲232.00 ▲0.0241.05 ▲4.6536.62 ▲3.41
Add New Post /wp-admin/post-new.php1,543 ▲1223.53 ▲0.46686.27 ▲43.1753.10 ▼1.03
Media Library /wp-admin/upload.php1,417 ▲174.17 ▼0.0298.95 ▼10.5945.22 ▼6.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: banners, display, prebid, banner, ad network...

purpleads/purpleads.php 92% from 13 tests

The main PHP file in "PurpleAds Ad Network" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin522 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS2561266
PHP13416255
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.67MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-1200.png29.60KB10.48KB▼ 64.58%
assets/screenshot-3.png114.65KB40.69KB▼ 64.51%
assets/video.png5.37KB1.09KB▼ 79.75%
assets/banner-1544x500.png153.88KB52.29KB▼ 66.02%
assets/resbanner.png18.39KB0.41KB▼ 97.76%