10% fortrader-informers

Code Review | ForTrader widgets

WordPress plugin ForTrader widgets scored 10% from 54 tests.

About plugin

  • Plugin page: fortrader-informers
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Sep 26, 2017
  • Latest release: Sep 26, 2017
  • Number of updates: 8
  • Update frequency: every 1.6 days
  • Top authors: akadem87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 834 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.79MB] [CPU: ▼54.71ms] Passed 4 tests

A check of server-side resources used by ForTrader widgets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.274.95 ▼39.34
Dashboard /wp-admin2.21 ▼1.096.32 ▼44.23
Posts /wp-admin/edit.php2.21 ▼1.146.38 ▼40.80
Add New Post /wp-admin/post-new.php2.21 ▼3.677.67 ▼94.46
Media Library /wp-admin/upload.php2.21 ▼1.027.01 ▼30.29

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 55 new files
Database: 1 new table, 8 new options
New tables
wp_ft_informers
New WordPress options
widget_recent-comments
widget_recent-posts
widget_ft_informer_widget
jal_db_version
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by ForTrader widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.24 ▼1.161.95 ▼0.0845.18 ▲0.51
Dashboard /wp-admin2,221 ▲335.95 ▲1.08109.33 ▲3.8571.37 ▲32.73
Posts /wp-admin/edit.php2,104 ▲151.98 ▼0.0839.54 ▲4.5436.36 ▲1.85
Add New Post /wp-admin/post-new.php1,690 ▲16024.41 ▲1.07665.22 ▼13.2956.79 ▼0.62
Media Library /wp-admin/upload.php1,403 ▲184.14 ▼0.06103.65 ▼7.8745.59 ▼2.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie tables were found after uninstall: 1 table
    • wp_ft_informers
  • Zombie WordPress options detected upon uninstall: 8 options
    • jal_db_version
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_ft_informer_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/fortrader-informers/views/addEdit.php
    • > /wp-content/plugins/fortrader-informers/views/list.php
  • 31× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fortrader-informers/includes/Widget.php:3
    • > PHP Notice
      Undefined variable: informerTitleText in wp-content/plugins/fortrader-informers/views/addEdit.php on line 11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/fortrader-informers/includes/InformersListTable.php on line 4
    • > PHP Notice
      Undefined variable: backToList in wp-content/plugins/fortrader-informers/views/addEdit.php on line 6
    • > PHP Notice
      Undefined variable: createnonce in wp-content/plugins/fortrader-informers/views/addEdit.php on line 65
    • > PHP Notice
      Undefined variable: tableContents in wp-content/plugins/fortrader-informers/views/list.php on line 4
    • > PHP Notice
      Undefined variable: mode in wp-content/plugins/fortrader-informers/views/addEdit.php on line 68
    • > PHP Notice
      Undefined variable: jsTexts in wp-content/plugins/fortrader-informers/views/addEdit.php on line 63
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/fortrader-informers/includes/InformersListTable.php on line 4
    • > PHP Notice
      Undefined variable: backUrl in wp-content/plugins/fortrader-informers/views/addEdit.php on line 70

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (ForTrader widgets manage page), #2 (ForTrader widgets edit page), #3 (Ft Widget)
Please take inspiration from this readme.txt

fortrader-informers/fortrader-informers.php Passed 13 tests

The principal PHP file in "ForTrader widgets" v. 0.1 is loaded by WordPress automatically on each request
38 characters long description:
Add financial widgets to your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,292 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5143851,682
PHP813510800
PO File3207242411
CSS83826399

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.60
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods49
▷ Static methods1224.49%
▷ Public methods4183.67%
▷ Protected methods24.08%
▷ Private methods612.24%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.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
25 PNG files occupy 0.47MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png49.23KB21.27KB▼ 56.79%
assets/screenshot-2.png95.70KB43.66KB▼ 54.38%
assets/img/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/img/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
assets/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%