84% linkrex-monetizer

Code Review | Linkrex Monetizer

WordPress plugin Linkrex Monetizer scored84%from 54 tests.

About plugin

  • Plugin page: linkrex-monetizer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 9, 2018
  • Latest release: Mar 9, 2018
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: namandixit316 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /997 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.85ms] Passed 4 tests

Server-side resources used by Linkrex Monetizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.27 ▼1.99
Dashboard /wp-admin3.32 ▲0.0245.74 ▼1.88
Posts /wp-admin/edit.php3.37 ▲0.0150.35 ▲2.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.75 ▼11.44
Media Library /wp-admin/upload.php3.24 ▲0.0134.60 ▼0.07
Linkrex Settings /wp-admin/options-general.php?page=Linkrex3.2131.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Linkrex Monetizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.73 ▲0.352.18 ▲0.4743.45 ▲1.95
Dashboard /wp-admin2,193 ▲135.63 ▼0.0499.29 ▲7.4143.76 ▲1.20
Posts /wp-admin/edit.php2,107 ▲72.04 ▲0.0541.75 ▲0.4934.45 ▼3.67
Add New Post /wp-admin/post-new.php1,534 ▼322.93 ▲4.75597.16 ▼24.1151.53 ▼46.92
Media Library /wp-admin/upload.php1,407 ▲104.21 ▲0.0895.78 ▼5.9942.44 ▼3.73
Linkrex Settings /wp-admin/options-general.php?page=Linkrex1,0022.0523.4854.86

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

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

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)
Good news, no errors were detected

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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/linkrex-monetizer/template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/linkrex-monetizer/megaurl.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: shortener, monetization, traffic, links, ad...

linkrex-monetizer/megaurl.php 92% from 13 tests

This is the main PHP file of "Linkrex Monetizer" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("linkrex-monetizer.php" instead of "megaurl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin89 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3152089

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods8
▷ Static methods225.00%
▷ Public methods562.50%
▷ Protected methods112.50%
▷ Private methods225.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin