68% responsive-ads-generator-lite

Code Review | Responsive Ads Generator Lite

WordPress plugin Responsive Ads Generator Lite scored68%from 54 tests.

About plugin

  • Plugin page: responsive-ads-ge...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.1
  • WordPress version: 6.3.1
  • First release: Jul 9, 2015
  • Latest release: Jul 9, 2015
  • Number of updates: 34
  • Update frequency: N/A
  • Top authors: cbfreeman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,039 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼36.31ms] Passed 4 tests

An overview of server-side resources used by Responsive Ads Generator Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.68 ▼4.44
Dashboard /wp-admin3.00 ▼0.3123.87 ▼28.54
Posts /wp-admin/edit.php3.00 ▼0.3624.38 ▼25.85
Add New Post /wp-admin/post-new.php3.00 ▼2.8922.20 ▼77.77
Media Library /wp-admin/upload.php3.00 ▼0.2322.65 ▼13.08
Instructions /wp-admin/admin.php?page=rag_instruct3.0025.35
Responsive Ads Generator Lite /wp-admin/admin.php?page=rag_options3.0026.40

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: 3 new tables, 6 new options
New tables
wp_rag_headers
wp_rag_settings
wp_rag_records
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Responsive Ads Generator Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14313.52 ▼1.029.03 ▲7.3956.12 ▲10.72
Dashboard /wp-admin2,221 ▲415.51 ▼0.1489.30 ▲0.3542.74 ▲2.65
Posts /wp-admin/edit.php2,129 ▲322.01 ▼0.0339.33 ▲3.5136.01 ▲2.94
Add New Post /wp-admin/post-new.php1,550 ▲1323.57 ▲5.23651.89 ▲34.0164.02 ▼3.08
Media Library /wp-admin/upload.php1,429 ▲324.21 ▼0.0097.66 ▼9.7143.83 ▼0.93
Instructions /wp-admin/admin.php?page=rag_instruct8502.2722.2225.87
Responsive Ads Generator Lite /wp-admin/admin.php?page=rag_options1,0172.0023.1632.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rag_options
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)

SRP 50% 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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/responsive-ads-generator-lite/rag.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/responsive-ads-generator-lite/rag-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/responsive-ads-generator-lite/rag-instruct.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Settings Page to generate your ads.), #2 (Shortcode and ad preview in your WordPress Admin.)
You can take inspiration from this readme.txt

responsive-ads-generator-lite/rag.php 92% from 13 tests

The principal PHP file in "Responsive Ads Generator Lite" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("responsive-ads-generator-lite.php" instead of "rag.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected584 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP414372379
CSS2512202
JavaScript1063

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 are no PNG files in this plugin