10% woo-simple-ads-server

Code Review | Woo Simple Ads Server

WordPress plugin Woo Simple Ads Server scored10%from 54 tests.

About plugin

  • Plugin page: woo-simple-ads-se...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Feb 26, 2017
  • Latest release: Feb 26, 2017
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: displaynone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /601 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/woo-ads-server.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WooAds_Server has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼62.82ms] Passed 4 tests

This is a short check of server-side resources used by Woo Simple Ads Server
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.415.86 ▼33.91
Dashboard /wp-admin2.07 ▼1.275.68 ▼69.18
Posts /wp-admin/edit.php2.07 ▼1.285.30 ▼46.35
Add New Post /wp-admin/post-new.php2.07 ▼3.816.13 ▼101.82
Media Library /wp-admin/upload.php2.07 ▼1.156.00 ▼31.19
All campaigns /wp-admin/edit.php?post_type=was_campaign2.086.42
Add campaign /wp-admin/post-new.php?post_type=was_campaign2.085.91

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

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

Browser metrics Passed 4 tests

Woo Simple Ads Server: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.33 ▼0.231.61 ▲0.0639.17 ▼0.63
Dashboard /wp-admin2,227 ▲505.61 ▲0.0182.25 ▼7.2642.24 ▲1.25
Posts /wp-admin/edit.php2,129 ▲291.99 ▲0.0033.80 ▼7.6736.39 ▼5.45
Add New Post /wp-admin/post-new.php1,562 ▲2718.36 ▲0.12609.22 ▼55.0975.48 ▲2.90
Media Library /wp-admin/upload.php1,429 ▲264.19 ▼0.0393.48 ▼9.8643.74 ▼4.66
All campaigns /wp-admin/edit.php?post_type=was_campaign1,0941.9731.1235.25
Add campaign /wp-admin/post-new.php?post_type=was_campaign1,5842.6251.8360.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/woo-ads-server.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WooAds_Server has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/woo-ads-server.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WooAds_Server has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/includes/helpers/class-was-banner.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; WooAds_Banner has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/includes/meta-boxes/class-was-meta-box-campaign-products.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; WooAds_Meta_Box_Campaign_Products has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/includes/meta-boxes/class-was-meta-box-campaign-scripts.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; WooAds_Meta_Box_Campaign_Scripts has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/includes/meta-boxes/class-was-meta-box-product-banners.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; WooAds_Meta_Box_Product_Banners has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/includes/post-types/class-was-campaign.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; WooAds_Campaigns has a deprecated constructor
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-admin/includes/template.php+1443
    Non-static method WooAds_Meta_Box_Campaign_Products::output() should not be called statically
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-content/plugins/woo-simple-ads-server/includes/helpers/class-was-banner.php+80
    Non-static method WooAds_Banner::set_sizes() should not be called statically
    • > GET request to /wp-admin/post-new.php?post_type=was_campaign
    • > Deprecated in wp-admin/includes/template.php+1443
    Non-static method WooAds_Meta_Box_Campaign_Scripts::output() should not be called statically

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: woocommerce, server, ads

woo-simple-ads-server/woo-ads-server.php 92% from 13 tests

Analyzing the main PHP file in "Woo Simple Ads Server" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-simple-ads-server.php" instead of "woo-ads-server.php")

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 plugin5,788 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG5445,121
PHP678148368
CSS1610165
JavaScript313898
Markdown120036

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods2893.33%
▷ Protected methods00.00%
▷ Private methods26.67%
Functions0
▷ Named functions00.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
42 PNG files occupy 1.03MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/dump_banners/88x31_blue.png3.75KB2.30KB▼ 38.66%
images/dump_banners/120x90_blue.png10.16KB4.58KB▼ 54.92%
images/dump_banners/240x400_blue.png40.82KB12.41KB▼ 69.60%
images/dump_banners/120x600_blue.png33.39KB10.43KB▼ 68.76%
images/dump_banners/180x150_blue.png21.23KB7.57KB▼ 64.34%