84% embad

Code Review | embAd Ads

WordPress plugin embAd Ads scored84%from 54 tests.

About plugin

  • Plugin page: embad
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.5
  • WordPress version: 6.3.1
  • First release: Jan 22, 2013
  • Latest release: May 2, 2013
  • Number of updates: 19
  • Update frequency: every 5.3 days
  • Top authors: segalr3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,314 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.66ms] Passed 4 tests

A check of server-side resources used by embAd Ads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.67 ▼0.50
Dashboard /wp-admin3.32 ▲0.0245.29 ▼7.89
Posts /wp-admin/edit.php3.37 ▲0.0246.08 ▲3.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.78 ▲1.75
Media Library /wp-admin/upload.php3.24 ▲0.0235.05 ▲0.01
EmbAd Settings /wp-admin/options-general.php?page=embad-admin3.2129.53

Server storage [IO: ▲0.01MB] [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: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
embad_status

Browser metrics Passed 4 tests

embAd Ads: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲11113.18 ▼1.471.87 ▲0.1640.80 ▲0.05
Dashboard /wp-admin2,213 ▲225.90 ▲0.05108.61 ▲2.9941.57 ▲1.77
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0540.40 ▲5.6835.61 ▼5.32
Add New Post /wp-admin/post-new.php1,544 ▲723.27 ▲0.06661.98 ▼7.5954.66 ▲1.24
Media Library /wp-admin/upload.php1,395 ▲74.18 ▲0.0293.44 ▼6.5143.46 ▲0.28
EmbAd Settings /wp-admin/options-general.php?page=embad-admin8502.0425.2826.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/embad/embad.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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 need to be fixed:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
Please take inspiration from this readme.txt

embad/embad.php Passed 13 tests

The principal PHP file in "embAd Ads" v. 1.0 is loaded by WordPress automatically on each request
75 characters long description:
This plugin will automatically add your EmbAd script to your website pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin102 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12216102

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin