84% trendmag-toolkit

Code Review | Trendmag Toolkit

WordPress plugin Trendmag Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: trendmag-toolkit
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.0
  • WordPress version: 6.3.1
  • First release: Jul 23, 2015
  • Latest release: Jul 23, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kopatheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.18ms] Passed 4 tests

A check of server-side resources used by Trendmag Toolkit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.05 ▼2.23
Dashboard /wp-admin3.34 ▲0.0442.20 ▼4.43
Posts /wp-admin/edit.php3.39 ▲0.0446.13 ▼1.89
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.37 ▼28.18
Media Library /wp-admin/upload.php3.26 ▲0.0434.43 ▲1.08

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 99 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Trendmag Toolkit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.154.44 ▲2.1442.63 ▼0.40
Dashboard /wp-admin2,206 ▲155.83 ▲0.93102.43 ▼3.5238.81 ▲0.28
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.1540.21 ▼4.5235.67 ▲0.83
Add New Post /wp-admin/post-new.php1,544 ▲1518.30 ▲0.13580.36 ▼51.7061.99 ▲14.82
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.0496.80 ▼7.0443.09 ▼1.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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)
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
Please take a closer look at the following
  • 40× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/trendmag-toolkit/inc/shortcodes/toggle.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trendmag-toolkit/inc/widgets/post/grid-posts-more-link.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trendmag-toolkit/inc/hook.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trendmag-toolkit/inc/widgets/post/sticky-posts.php:3
    • > PHP Fatal error
      require(): Failed opening required 'TT_PATHinc/fields/widget/link-icon.php' (include_path='.:/usr/share/php') in wp-content/plugins/trendmag-toolkit/inc/field.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trendmag-toolkit/inc/widgets/intro/advertisement.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/trendmag-toolkit/trendmag-toolkit.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trendmag-toolkit/inc/widgets/contact/google-map.php:3
    • > PHP Warning
      require(TT_PATHinc/fields/widget/link-icon.php): failed to open stream: No such file or directory in wp-content/plugins/trendmag-toolkit/inc/field.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trendmag-toolkit/inc/widgets/social/instagram-photos.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

trendmag-toolkit/trendmag-toolkit.php 92% from 13 tests

The primary PHP file in "Trendmag Toolkit" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number 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 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin10,878 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
CSS112841375,044
PHP479471093,875
Sass5680830
SVG200568
JavaScript5100437
CoffeeScript2340124

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.10
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods110
▷ Static methods2825.45%
▷ Public methods10999.09%
▷ Protected methods00.00%
▷ Private methods10.91%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
16 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/jquery-ui/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/css/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
assets/css/jquery-ui/images/ui-bg_flat_65_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
assets/images/layouts/shop.png12.92KB9.13KB▼ 29.30%