10% wp-dealpixel-ads

Code Review | WP DealPixel Ads

WordPress plugin WP DealPixel Ads scored10%from 54 tests.

About plugin

  • Plugin page: wp-dealpixel-ads
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.5
  • WordPress version: 6.3.1
  • First release: Feb 27, 2013
  • Latest release: Jun 4, 2013
  • Number of updates: 12
  • Update frequency: every 8.2 days
  • Top authors: jgwhite33 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,199 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-dealpixel-ads/wp_dealpixel_ads.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; WPDealPixelAdsWidget has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼54.52ms] Passed 4 tests

Analyzing server-side resources used by WP DealPixel Ads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.314.95 ▼36.26
Dashboard /wp-admin2.18 ▼1.136.61 ▼44.44
Posts /wp-admin/edit.php2.18 ▼1.185.20 ▼47.62
Add New Post /wp-admin/post-new.php2.18 ▼3.717.04 ▼89.77
Media Library /wp-admin/upload.php2.18 ▼1.055.27 ▼31.91

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_wpdealpixelads

Browser metrics Passed 4 tests

An overview of browser requirements for WP DealPixel Ads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.20 ▼1.391.77 ▼0.2644.86 ▼1.14
Dashboard /wp-admin2,206 ▲155.83 ▼0.05108.85 ▼2.5043.12 ▲3.75
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0338.36 ▼10.5633.96 ▼1.29
Add New Post /wp-admin/post-new.php1,519 ▼022.89 ▼0.24643.74 ▼95.7061.11 ▼4.03
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0293.91 ▼22.9440.28 ▼13.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-dealpixel-ads/wp_dealpixel_ads.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; WPDealPixelAdsWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_wpdealpixelads
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-dealpixel-ads/wp_dealpixel_ads.php:12
    • > PHP Notice
      Undefined index: buy in wp-content/plugins/wp-dealpixel-ads/store.php on line 4
    • > PHP Notice
      Undefined index: cheap in wp-content/plugins/wp-dealpixel-ads/store.php on line 5
    • > PHP Notice
      Undefined index: buyurl in wp-content/plugins/wp-dealpixel-ads/store.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-dealpixel-ads === )
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wp-dealpixel-ads/wp_dealpixel_ads.php 92% from 13 tests

"WP DealPixel Ads" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-dealpixel-ads.php" instead of "wp_dealpixel_ads.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin274 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24045274

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity8.50
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
dp-logo.png2.02KB1.26KB▼ 37.26%