10% loopwi

Code Review | Loopwi - Get paid to show adverts on your website

WordPress plugin Loopwi - Get paid to show adverts on your website scored 10% from 54 tests.

About plugin

  • Plugin page: loopwi
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.9.2
  • First release: Nov 12, 2021
  • Latest release: Nov 20, 2021
  • Number of updates: 7
  • Update frequency: every 1.1 days
  • Top authors: loopwi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 99 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/loopwi/loopwi.php+63
    Trying to get property 'pid' of non-object

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

This is a short check of server-side resources used by Loopwi - Get paid to show adverts on your website
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.10594.51 ▲541.68
Dashboard /wp-admin3.45 ▲0.0435.74 ▲2.00
Posts /wp-admin/edit.php3.68 ▲0.0438.60 ▲1.01
Add New Post /wp-admin/post-new.php6.92 ▼0.0694.26 ▼1,316.23
Media Library /wp-admin/upload.php3.33 ▲0.0327.22 ▲3.36
Loopwi /wp-admin/admin.php?page=loopwi_ads3.5630.80
Settings /wp-admin/admin.php?page=loopwi_ads_settings3.5628.57

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 37 new files
Database: 1 new table, 1 new option
New tables
wp_loopwi_adsplugins_settings
New WordPress options
my_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Loopwi - Get paid to show adverts on your website
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,968 ▲22616.17 ▲0.379.10 ▲3.318.64 ▲6.27
Dashboard /wp-admin2,923 ▲696.14 ▼0.04116.34 ▼15.44152.81 ▼10.35
Posts /wp-admin/edit.php2,719 ▲313.24 ▲0.0062.64 ▼3.56145.67 ▲3.86
Add New Post /wp-admin/post-new.php1,771 ▲11021.28 ▲4.71454.93 ▲41.81160.72 ▲6.28
Media Library /wp-admin/upload.php1,726 ▲285.56 ▲0.07138.00 ▼0.74185.07 ▼1.79
Loopwi /wp-admin/admin.php?page=loopwi_ads1,2572.3954.42138.89
Settings /wp-admin/admin.php?page=loopwi_ads_settings1,2342.3853.8076.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_loopwi_adsplugins_settings
  • This plugin does not fully uninstall, leaving 1 option in the database
    • my_db_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=loopwi_ads
    • > Notice in wp-content/plugins/loopwi/includes/dashboard.php+38
    Undefined variable: site_code

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/loopwi/includes/dashboard.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/loopwi/includes/settings.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=loopwi_ads_settings
    • > Network (severe)
    wp-content/plugins/loopwi/css/plugins.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=loopwi_ads_settings
    • > Network (severe)
    wp-content/themes/twentytwentytwo/js/jquery.min.js?ver=3.6.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

loopwi/loopwi.php 92% from 13 tests

The principal PHP file in "Loopwi - Get paid to show adverts on your website" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected11,624 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS9382758,697
SVG1132,624
PHP38151287
JavaScript411116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/payment-methods.png42.08KB3.65KB▼ 91.32%
images/logo_small.png1.08KB1.16KB0.00%
images/logo-light.png4.44KB3.26KB▼ 26.56%
images/logo.png4.45KB3.26KB▼ 26.71%