84% loks-monetization

Code Review | wix.cx Monetization

WordPress plugin wix.cx Monetization scored 84% from 54 tests.

About plugin

  • Plugin page: loks-monetization
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.7.2
  • WordPress version: 5.8.1
  • First release: May 11, 2017
  • Latest release: Jul 18, 2018
  • Number of updates: 6
  • Update frequency: every 72.2 days
  • Top authors: ahmedrageh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 722 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼174.09ms] Passed 4 tests

This is a short check of server-side resources used by wix.cx Monetization
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.212,277.30 ▲2,253.91
Dashboard /wp-admin3.13 ▲0.0753.56 ▲5.56
Posts /wp-admin/edit.php3.24 ▲0.1349.51 ▲2.37
Add New Post /wp-admin/post-new.php5.49 ▲0.06102.52 ▼699.74
Media Library /wp-admin/upload.php3.07 ▲0.0637.83 ▼4.54
Wix Monetize your website /wp-admin/options-general.php?page=wix-website-monetization3.0933.16

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 19 new options
New WordPress options
wix_fps_enabled
wix_token
wix_fps_capping_timeout
wix_us_capping_timeout
wix_email
wix_fps_capping_enabled
wix_pop_enabled
wix_us_timeout
wix_email_changed
wix_us_capping_limit
...

Browser metrics Passed 4 tests

A check of browser resources used by wix.cx Monetization
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,831 ▲19416.55 ▲0.5316.43 ▲4.1254.21 ▲0.57
Dashboard /wp-admin2,997 ▲636.01 ▲0.02147.14 ▼14.65128.71 ▲15.33
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0167.68 ▼0.8295.31 ▲1.46
Add New Post /wp-admin/post-new.php1,686 ▲8018.12 ▼0.48404.09 ▲2.32113.06 ▼2.36
Media Library /wp-admin/upload.php1,812 ▲25.05 ▲0.04169.81 ▲8.14125.37 ▼3.04
Wix Monetize your website /wp-admin/options-general.php?page=wix-website-monetization1,3112.3662.0189.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • wix_api_ready

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'wix_Monetization' not found in wp-content/plugins/loks-monetization/views/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'wix_Monetization' not found in wp-content/plugins/loks-monetization/views/public.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: monetization, traffic

loks-monetization/wix-website-monetization.php 85% from 13 tests

"wix.cx Monetization" version 1.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("loks-monetization.php" instead of "wix-website-monetization.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 plugin890 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7114295437
CSS2363259
PO File1313594
SVG10156
JavaScript212144

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity14.50
▷ Minimum class complexity7.00
▷ Maximum class complexity22.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1144.00%
▷ Public methods1976.00%
▷ Protected methods00.00%
▷ Private methods624.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.13MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png114.90KB28.40KB▼ 75.28%
assets/on.png0.98KB0.10KB▼ 90.26%
assets/slider_right.png0.91KB0.08KB▼ 91.00%
assets/ninjahead.png15.19KB0.81KB▼ 94.64%
assets/switch-round.png1.73KB0.63KB▼ 63.81%