94% fastnews-light-toolkit

Code Review | Fastnews Light Toolkit

WordPress plugin Fastnews Light Toolkit scored 94% from 54 tests.

About plugin

  • Plugin page: fastnews-light-to...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.3
  • WordPress version: 5.8.1
  • First release: Oct 14, 2015
  • Latest release: Oct 14, 2015
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: duy.tran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,393 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼176.86ms] Passed 4 tests

A check of server-side resources used by Fastnews Light Toolkit
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.63 ▲13.17
Dashboard /wp-admin3.06 ▲0.0137.20 ▼10.25
Posts /wp-admin/edit.php3.12 ▲0.0145.20 ▼3.72
Add New Post /wp-admin/post-new.php5.43 ▼0.0094.58 ▼687.86
Media Library /wp-admin/upload.php3.01 ▼0.0034.68 ▼5.60

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fastnews Light Toolkit
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.21 ▲0.5712.08 ▲1.8247.77 ▲0.98
Dashboard /wp-admin2,964 ▲305.92 ▼0.02146.04 ▼2.79109.91 ▲2.62
Posts /wp-admin/edit.php2,739 ▼02.73 ▲0.0184.34 ▲10.4889.79 ▲3.91
Add New Post /wp-admin/post-new.php1,672 ▼1118.85 ▲0.10413.88 ▲15.43106.05 ▼4.28
Media Library /wp-admin/upload.php1,807 ▲595.04 ▲0.06156.33 ▼8.98113.89 ▼13.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require(FLT_PATHinc/widgets/post/post_list_small.php): failed to open stream: No such file or directory in wp-content/plugins/fastnews-light-toolkit/inc/widget.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fastnews-light-toolkit/inc/widgets/post/post_list_small.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fastnews-light-toolkit/inc/widgets/post/post_entry_list_2.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fastnews-light-toolkit/inc/widgets/intro/feedburner.php:3
    • > PHP Fatal error
      require(): Failed opening required 'FLT_PATHinc/widgets/post/post_list_small.php' (include_path='.:/usr/share/php') in wp-content/plugins/fastnews-light-toolkit/inc/widget.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fastnews-light-toolkit/fastnews-light-toolkit.php:20
    • > PHP Warning
      Use of undefined constant FLT_PATH - assumed 'FLT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/fastnews-light-toolkit/inc/widget.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fastnews-light-toolkit/inc/widgets/post/post_list_carousel.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fastnews-light-toolkit/inc/widgets/post/post_flexslider.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fastnews-light-toolkit/inc/widgets/intro/mailchimp_subscribe.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

fastnews-light-toolkit/fastnews-light-toolkit.php 92% from 13 tests

The principal PHP file in "Fastnews Light Toolkit" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.8" instead of "4.1")

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
No dangerous file extensions were detected925 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP911016925

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.43
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods21
▷ Static methods838.10%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin