10% dealads

Code Review | DealAds

WordPress plugin DealAds scored10%from 54 tests.

About plugin

  • Plugin page: dealads
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Apr 26, 2016
  • Number of updates: 4
  • Update frequency: every 130.3 days
  • Top authors: jensbaum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,433 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/dealads/includes/widget.php+119
    Function create_function() is deprecated

Server metrics [RAM: ▼1.88MB] [CPU: ▼59.20ms] Passed 4 tests

Server-side resources used by DealAds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.345.32 ▼35.45
Dashboard /wp-admin2.14 ▼1.219.01 ▼54.21
Posts /wp-admin/edit.php2.14 ▼1.225.83 ▼47.99
Add New Post /wp-admin/post-new.php2.14 ▼3.756.79 ▼99.15
Media Library /wp-admin/upload.php2.14 ▼1.096.48 ▼28.17
DealAds /wp-admin/options-general.php?page=wpda_settings2.146.49

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_wpda_widget
widget_theysaidso_widget
db_upgraded
wpda_window
wpda_legal
theysaidso_admin_options
wpda_region
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for DealAds
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5514.53 ▲0.331.86 ▲0.1444.29 ▲0.41
Dashboard /wp-admin2,203 ▲265.68 ▲0.0394.39 ▼1.4942.90 ▲1.73
Posts /wp-admin/edit.php2,111 ▲82.00 ▲0.0134.26 ▼5.8531.63 ▼11.40
Add New Post /wp-admin/post-new.php1,536 ▲723.38 ▼0.30657.82 ▼46.1152.56 ▼3.10
Media Library /wp-admin/upload.php1,405 ▲54.19 ▲0.01110.07 ▼0.5847.18 ▲2.17
DealAds /wp-admin/options-general.php?page=wpda_settings9211.9923.3533.84

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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/dealads/includes/widget.php+119
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_wpda_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpda_settings
    • > Deprecated in wp-content/plugins/dealads/includes/widget.php+119
    Function create_function() is deprecated

SRP 0% from 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dealads/dealads.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dealads/admin/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dealads/includes/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === dealads === )
You can look at the official readme.txt

dealads/dealads.php 92% from 13 tests

The primary PHP file in "DealAds" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected720 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP58224517
PO File13945103
CSS1200100
JavaScript1100

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity39.00
▷ Minimum class complexity19.00
▷ Maximum class complexity59.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1266.67%
▷ Protected methods00.00%
▷ Private methods633.33%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo.png30.35KB13.06KB▼ 56.99%