68% shink-monetization

Code Review | Shink monetization

WordPress plugin Shink monetization scored 68% from 54 tests.

About plugin

  • Plugin page: shink-monetization
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2016
  • Latest release: Jul 12, 2021
  • Number of updates: 25
  • Update frequency: every 69.5 days
  • Top authors: adsnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,334 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Shink monetization
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.99 ▼4.87
Dashboard /wp-admin2.99 ▼0.3121.86 ▼28.37
Posts /wp-admin/edit.php2.99 ▼0.3627.54 ▼25.30
Add New Post /wp-admin/post-new.php2.99 ▼2.8925.28 ▼60.52
Media Library /wp-admin/upload.php2.99 ▼0.2324.35 ▼12.39
Shink website monetization Settings /wp-admin/options-general.php?page=shink-monetization/shink_web_monetization.php3.0023.93

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shink monetization
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.34 ▼1.031.68 ▼0.3240.94 ▼7.75
Dashboard /wp-admin2,213 ▲284.85 ▼0.04108.12 ▼8.8940.50 ▼2.11
Posts /wp-admin/edit.php2,096 ▲71.98 ▼0.0139.71 ▲1.8634.98 ▲3.13
Add New Post /wp-admin/post-new.php1,536 ▲1723.36 ▲0.16663.08 ▼31.2249.98 ▼19.73
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0397.69 ▼23.1344.72 ▼5.61
Shink website monetization Settings /wp-admin/options-general.php?page=shink-monetization/shink_web_monetization.php9432.0422.5126.18

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
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=shink-monetization/shink_web_monetization.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shink-monetization/shink_web_monetization.php:190

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

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: shortlink, ad, shink, money, easylink

shink-monetization/shink_web_monetization.php 92% from 13 tests

The main file in "Shink monetization" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("shink-monetization.php" instead of "shink_web_monetization.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
There were no executable files found in this plugin1,206 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2134181,027
PHP158179

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.95
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%
Functions14
▷ Named functions1071.43%
▷ Anonymous functions428.57%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin