84% masoffer-dynamic-link

Code Review | Masoffer Dynamic Link

WordPress plugin Masoffer Dynamic Link scored84%from 54 tests.

About plugin

  • Plugin page: masoffer-dynamic-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2019
  • Latest release: Dec 10, 2020
  • Number of updates: 7
  • Update frequency: every 71.9 days
  • Top authors: masoffer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /902 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.01MB] [CPU: ▼0.46ms] Passed 4 tests

This is a short check of server-side resources used by Masoffer Dynamic Link
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.87 ▼2.30
Dashboard /wp-admin3.31 ▲0.0161.61 ▲8.80
Posts /wp-admin/edit.php3.36 ▲0.0146.36 ▼4.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.35 ▲6.01
Media Library /wp-admin/upload.php3.24 ▲0.0135.89 ▼0.97
MasOffer Dynamic Link /wp-admin/options-general.php?page=masoffer-dynamic-link-official3.2434.81

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

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

Browser metrics Passed 4 tests

Masoffer Dynamic Link: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.59 ▼0.971.76 ▲0.0944.16 ▼5.23
Dashboard /wp-admin2,213 ▲255.86 ▲1.0097.80 ▼17.2639.99 ▼1.57
Posts /wp-admin/edit.php2,093 ▲71.99 ▼0.0136.82 ▲0.9233.88 ▲2.89
Add New Post /wp-admin/post-new.php1,545 ▲2618.09 ▼5.10632.32 ▼40.3047.92 ▲0.39
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0495.19 ▼6.0942.68 ▼1.33
MasOffer Dynamic Link /wp-admin/options-general.php?page=masoffer-dynamic-link-official9712.0325.5445.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/masoffer-dynamic-link/views/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/masoffer-dynamic-link/masoffer-dynamic-link.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 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
2 plugin tags: affiliate, marketing

masoffer-dynamic-link/masoffer-dynamic-link.php Passed 13 tests

The main PHP file in "Masoffer Dynamic Link" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
44 characters long description:
Plugin hỗ trợ redirect link sản phẩm

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
Success! There were no dangerous files found in this plugin241 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32510241

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/mo2-300x51.png12.21KB6.37KB▼ 47.81%