83% tipalink

Code Review | Tipalink WordPress Plugin

WordPress plugin Tipalink WordPress Plugin scored 83% from 54 tests.

About plugin

  • Plugin page: tipalink
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2
  • WordPress version: 5.9.2
  • First release: Aug 13, 2019
  • Latest release: Aug 13, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: tipalink (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 344 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▲2,336.04ms] 50% from 4 tests

Analyzing server-side resources used by Tipalink WordPress Plugin
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 4,095.64ms on /wp-admin/tools.php?page=redux-about)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 2,336.04ms on /wp-admin/tools.php?page=redux-about)
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2460.11 ▲8.91
Dashboard /wp-admin3.98 ▲0.572,300.33 ▲2,267.83
Posts /wp-admin/edit.php3.86 ▲0.224,246.60 ▲4,210.03
Add New Post /wp-admin/post-new.php7.17 ▲0.204,115.87 ▲2,857.38
Media Library /wp-admin/upload.php3.59 ▲0.295,026.50 ▲4,993.08
Tipalink /wp-admin/options-general.php?page=tipalink_plugin4.052,077.64
Redux Framework /wp-admin/tools.php?page=redux-about3.564,095.64

Server storage [IO: ▲4.50MB] [DB: ▲0.06MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 457 new files
Database: no new tables, 3 new options
New WordPress options
redux_demo-transients
redux_demo
redux_version_upgraded_from

Browser metrics Passed 4 tests

Checking browser requirements for Tipalink WordPress Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲5013.93 ▼2.078.81 ▲3.262.83 ▲0.53
Dashboard /wp-admin2,981 ▲1236.01 ▼0.18120.62 ▼8.94154.69 ▼4.09
Posts /wp-admin/edit.php2,701 ▲73.36 ▲0.1362.38 ▼1.86139.19 ▼5.52
Add New Post /wp-admin/post-new.php1,717 ▼3521.52 ▲0.57436.56 ▼1.21155.10 ▼6.69
Media Library /wp-admin/upload.php1,705 ▲75.47 ▼0.04146.01 ▲6.17174.25 ▼13.31
Tipalink /wp-admin/options-general.php?page=tipalink_plugin1,5924.2498.20184.34
Redux Framework /wp-admin/tools.php?page=redux-about1,3394.0399.74212.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 3 options
    • redux_demo-transients
    • redux_version_upgraded_from
    • redux_demo

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_devs.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Redux_Customizer_Control' not found in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_fields.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/templates/panel/footer.tpl.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/templates/panel/header.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/templates/panel/container.tpl.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/templates/panel/content.tpl.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_section.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/inc/welcome/views/changelog.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/inc/fields/select/elusive-icons.php:312
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/tipalink/includes/admin/framework/redux-framework/ReduxCore/inc/themecheck/checks/embedded.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: tip, donate, fundme, micropayment

tipalink/tipalink-plugin.php 85% from 13 tests

"Tipalink WordPress Plugin" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tipalink.php" instead of "tipalink-plugin.php")

Code Analysis 97% from 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 plugin46,402 lines of code in 320 files:
LanguageFilesBlank linesComment linesLines of code
PHP1194,1518,18718,377
JavaScript872,6172,10612,233
Sass541,187607,580
JSON418405,121
Markdown458001,750
SVG100934
CSS47940197
XML21097
HTML17060
LESS10053

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity31.38
▷ Minimum class complexity1.00
▷ Maximum class complexity883.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes108
▷ Abstract classes00.00%
▷ Concrete classes108100.00%
▷ Final classes10.93%
Methods616
▷ Static methods11318.34%
▷ Public methods46976.14%
▷ Protected methods9114.77%
▷ Private methods569.09%
Functions27
▷ Named functions2696.30%
▷ Anonymous functions13.70%
Constants63
▷ Global constants57.94%
▷ Class constants5892.06%
▷ Public constants58100.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
36 PNG files occupy 0.19MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/framework/redux-framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_ffffff_1x400.png0.10KB0.10KB▼ 4.67%
includes/admin/framework/redux-framework/sample/patterns/wild_flowers.png46.05KB49.23KB0.00%
includes/admin/framework/redux-framework/ReduxCore/assets/img/1col.png2.83KB0.14KB▼ 95.13%
includes/admin/framework/redux-framework/ReduxCore/inc/fields/switch/slider-control.png1.65KB0.75KB▼ 54.62%
includes/admin/framework/redux-framework/ReduxCore/inc/fields/spinner/arrow_left.png0.15KB0.12KB▼ 16.67%