84% simple-web-monetization-by-interledger

Code Review | Simple Web Monetization by Interledger

WordPress plugin Simple Web Monetization by Interledger scored84%from 54 tests.

About plugin

  • Plugin page: simple-web-moneti...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Apr 7, 2022
  • Latest release: Apr 7, 2022
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: interledger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,019 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼7.90ms] Passed 4 tests

This is a short check of server-side resources used by Simple Web Monetization by Interledger
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0729.08 ▼16.88
Dashboard /wp-admin3.32 ▲0.0247.63 ▼3.19
Posts /wp-admin/edit.php3.38 ▲0.0257.04 ▲7.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.63 ▼15.54
Media Library /wp-admin/upload.php3.25 ▲0.0238.59 ▲4.00
Simple Web Monetization /wp-admin/options-general.php?page=simple-web-monetization-for-wordpress-by-interledger-plugin-settings3.2232.41

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Simple Web Monetization by Interledger: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.29 ▲0.121.70 ▲0.0445.94 ▲6.48
Dashboard /wp-admin2,204 ▲245.63 ▼0.0986.05 ▼3.4839.17 ▼3.44
Posts /wp-admin/edit.php2,111 ▲82.00 ▲0.0559.71 ▲15.9647.08 ▲8.91
Add New Post /wp-admin/post-new.php1,369 ▼16016.71 ▼6.44565.54 ▼105.9745.28 ▼10.23
Media Library /wp-admin/upload.php1,406 ▲64.22 ▲0.0096.31 ▼9.3240.61 ▼6.65
Simple Web Monetization /wp-admin/options-general.php?page=simple-web-monetization-for-wordpress-by-interledger-plugin-settings9711.8127.0333.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-web-monetization-by-interledger/admin/class-simple-web-monetization-wordpress-interledger-admin.php:292

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

readme.txt Passed 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
3 plugin tags: interledger, charity, web monetization

simple-web-monetization-by-interledger/simple-web-monetization-wordpress-interledger.php 85% from 13 tests

The principal PHP file in "Simple Web Monetization by Interledger" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-web-monetization-by-interledger.php" instead of "simple-web-monetization-wordpress-interledger.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected402 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10138496338
Markdown131045
JavaScript16419

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin