83% premiuum-content-monetization

Code Review | PREMIUUM Content Monetization

WordPress plugin PREMIUUM Content Monetization scored83%from 54 tests.

About plugin

  • Plugin page: premiuum-content-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 27, 2022
  • Latest release: Jul 29, 2022
  • Number of updates: 59
  • Update frequency: every 0.0 days
  • Top authors: premiuum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /198 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▲2,021.11ms] 75% from 4 tests

A check of server-side resources used by PREMIUUM Content Monetization
The following require your attention
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 2,021.11ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.291,958.85 ▲1,918.82
Dashboard /wp-admin3.58 ▲0.232,145.06 ▲2,079.38
Posts /wp-admin/edit.php3.63 ▲0.272,063.38 ▲2,010.47
Add New Post /wp-admin/post-new.php6.10 ▲0.212,185.26 ▲2,075.76
Media Library /wp-admin/upload.php2.58 ▼0.665,012.18 ▲4,971.48

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 74 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for PREMIUUM Content Monetization
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,024 ▲27814.02 ▼0.6117.00 ▲15.3974.52 ▲32.47
Dashboard /wp-admin2,211 ▲365.54 ▼0.2584.18 ▼21.1244.67 ▲2.35
Posts /wp-admin/edit.php2,116 ▲161.97 ▼0.0132.13 ▼3.7040.93 ▲7.21
Add New Post /wp-admin/post-new.php1,547 ▲2123.49 ▼0.19610.91 ▼75.0381.93 ▲27.24
Media Library /wp-admin/upload.php1,419 ▲224.15 ▲0.0597.83 ▼7.8942.93 ▼3.20

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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)
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/premiuum-content-monetization/premiuum.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

premiuum-content-monetization/premiuum.php 92% from 13 tests

The main PHP script in "PREMIUUM Content Monetization" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("premiuum-content-monetization.php" instead of "premiuum.php")

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
Everything looks great! No dangerous files found in this plugin7,410 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG12003,808
CSS12682182,009
PHP11,0152891,593

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/premiuum_dashboard_pricetag_set.png23.15KB10.37KB▼ 55.21%
assets/images/premiuum_go_live_v1_600x350_T.png41.12KB7.99KB▼ 80.58%
assets/images/premiuum_dashboard_pricetag_view.png21.29KB9.57KB▼ 55.05%
assets/images/premiuum_uu_icon_600x600_v2.png8.89KB3.68KB▼ 58.56%
assets/images/premiuum_dashboard_icon_5_T.png28.79KB12.38KB▼ 56.98%