78% good-loop-ad-widget

Code Review | Good-Loop ad widget

WordPress plugin Good-Loop ad widget scored78%from 54 tests.

About plugin

  • Plugin page: good-loop-ad-widget
  • Plugin version: 0.1
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.10-5.0
  • WordPress version: 6.3.1
  • First release: Jun 20, 2018
  • Latest release: Dec 7, 2018
  • Number of updates: 10
  • Update frequency: every 17.0 days
  • Top authors: goodloop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /577 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Good-Loop ad widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.59 ▲1.20
Dashboard /wp-admin3.34 ▲0.0455.04 ▲1.19
Posts /wp-admin/edit.php3.39 ▲0.0450.42 ▲0.14
Add New Post /wp-admin/post-new.php5.92 ▲0.04102.04 ▲3.40
Media Library /wp-admin/upload.php3.26 ▲0.0435.18 ▼1.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_goodloop_adwidget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Good-Loop ad widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.072.08 ▲0.2944.02 ▼3.91
Dashboard /wp-admin2,199 ▲225.56 ▼0.0483.88 ▼18.8339.90 ▼8.98
Posts /wp-admin/edit.php2,104 ▲12.04 ▼0.1239.96 ▲0.6534.91 ▼4.85
Add New Post /wp-admin/post-new.php1,529 ▼623.41 ▲5.11650.09 ▲9.2552.88 ▼6.39
Media Library /wp-admin/upload.php1,401 ▲14.16 ▼0.0399.32 ▼9.2445.35 ▼1.46
Good-loop /wp-admin/good-loop-adwidget.php260.420.1413.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_goodloop_adwidget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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)
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/good-loop-ad-widget/views/admin.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/good-loop-adwidget.php
    • > Network (severe)
    wp-admin/good-loop-adwidget.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: widget, good-loop, ads, adverts, charity...

good-loop-ad-widget/good-loop-adwidget.php 92% from 13 tests

Analyzing the main PHP file in "Good-Loop ad widget" version 0.1
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("good-loop-ad-widget.php" instead of "good-loop-adwidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin166 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21813166

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin