68% easy-ads-or-text

Code Review | Easy ADS or Text

WordPress plugin Easy ADS or Text scored 68% from 54 tests.

About plugin

  • Plugin page: easy-ads-or-text
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Jul 18, 2019
  • Latest release: Jul 19, 2019
  • Number of updates: 19
  • Update frequency: every 0.1 days
  • Top authors: iduid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 651 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.28ms] Passed 4 tests

This is a short check of server-side resources used by Easy ADS or Text
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0535.07 ▼6.98
Dashboard /wp-admin3.34 ▲0.0445.44 ▼5.43
Posts /wp-admin/edit.php3.46 ▲0.1044.25 ▼2.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.69 ▼14.58
Media Library /wp-admin/upload.php3.27 ▲0.0437.07 ▲1.08
Items /wp-admin/edit.php?post_type=duid-ads3.3236.44
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=duid-ads3.2652.38
Add New /wp-admin/post-new.php?post_type=duid-ads3.4452.45

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_plugin_dadptplugin_stats_visits
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
category_children
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Easy ADS or Text
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲11414.47 ▲0.081.68 ▼0.2940.03 ▼7.51
Dashboard /wp-admin2,236 ▲515.84 ▼0.06100.68 ▼13.5839.96 ▼2.21
Posts /wp-admin/edit.php2,125 ▲362.01 ▼0.0443.52 ▲3.8234.55 ▼0.59
Add New Post /wp-admin/post-new.php1,559 ▲1723.33 ▲4.98657.66 ▲55.1951.16 ▲0.16
Media Library /wp-admin/upload.php1,418 ▲304.20 ▼0.0395.88 ▼10.0442.25 ▼2.11
Items /wp-admin/edit.php?post_type=duid-ads1,1272.0032.3029.56
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=duid-ads1,4762.1434.8634.24
Add New /wp-admin/post-new.php?post_type=duid-ads2,6288.24185.2273.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_plugin_dadptplugin_stats_visits
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • category_children
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% 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)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/easy-ads-or-text/iduid-easy-ads.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/easy-ads-or-text/inc/meta_box_content.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/easy-ads-or-text/inc/meta_box_is_check.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/easy-ads-or-text/inc/meta_box_count.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (26 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

easy-ads-or-text/iduid-easy-ads.php 85% from 13 tests

The main file in "Easy ADS or Text" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-ads-or-text.php" instead of "iduid-easy-ads.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 203 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin652 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP613221539
PO File1282991
JavaScript13122

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected