78% navthemes-widgets

Code Review | NavThemes Widgets

WordPress plugin NavThemes Widgets scored 78% from 54 tests.

About plugin

  • Plugin page: navthemes-widgets
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 5.8.1
  • First release: Sep 22, 2018
  • Latest release: Oct 5, 2018
  • Number of updates: 12
  • Update frequency: every 1.1 days
  • Top authors: navthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 552 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
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼139.03ms] Passed 4 tests

Server-side resources used by NavThemes Widgets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.09 ▲0.3739.93 ▲21.66
Dashboard /wp-admin3.39 ▲0.3355.02 ▲9.47
Posts /wp-admin/edit.php3.45 ▲0.3352.48 ▲3.62
Add New Post /wp-admin/post-new.php5.67 ▲0.2396.31 ▼571.31
Media Library /wp-admin/upload.php3.25 ▲0.2536.88 ▲2.09

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_about_widgets
widget_navthemes_partners_widgets
widget_navthemes_plan_widget
widget_navthemes_testimonials_widgets
widget_navthemes_service_widgets
widget_navthemes_heading_widgets
widget_navthemes_callaction_widgets
widget_navthemes_team_widgets

Browser metrics Passed 4 tests

NavThemes Widgets: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,901 ▲30517.26 ▲1.978.46 ▼0.0652.03 ▲3.86
Dashboard /wp-admin3,166 ▲2327.82 ▲1.71173.39 ▲13.55122.27 ▼1.34
Posts /wp-admin/edit.php2,964 ▲2254.29 ▲1.6083.31 ▲13.05105.02 ▲10.84
Add New Post /wp-admin/post-new.php1,596 ▼8718.53 ▼0.25378.50 ▼7.76140.45 ▲28.25
Media Library /wp-admin/upload.php1,810 ▲34.80 ▼0.23125.64 ▼25.49135.63 ▲7.12

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: 8 options
    • widget_navthemes_service_widgets
    • widget_navthemes_plan_widget
    • widget_navthemes_heading_widgets
    • widget_navthemes_team_widgets
    • widget_about_widgets
    • widget_navthemes_partners_widgets
    • widget_navthemes_testimonials_widgets
    • widget_navthemes_callaction_widgets

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/navthemes-widgets/widgets/callaction-view.php
    • > /wp-content/plugins/navthemes-widgets/widgets/heading-view.php
    • > /wp-content/plugins/navthemes-widgets/widgets/team-view.php
    • > /wp-content/plugins/navthemes-widgets/widgets/service-view.php
    • > /wp-content/plugins/navthemes-widgets/widgets/plan-view.php
    • > /wp-content/plugins/navthemes-widgets/widgets/about-view.php
    • > /wp-content/plugins/navthemes-widgets/widgets/testimonials-view.php
    • > /wp-content/plugins/navthemes-widgets/widgets/partners-view.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/navthemes-widgets/widgets/team-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/navthemes-widgets/navthemes-widgets.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/navthemes-widgets/widgets/partners-widget.php:6
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/navthemes-widgets/widgets/about-view.php on line 70
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/navthemes-widgets/widgets/heading-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/navthemes-widgets/widgets/about-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/navthemes-widgets/widgets/testimonials-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/navthemes-widgets/widgets/plan-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/navthemes-widgets/widgets/callaction-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/navthemes-widgets/widgets/services-widget.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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:
  • Screenshots: Screenshot #1 (Widget Area) image required
The official readme.txt might help

navthemes-widgets/navthemes-widgets.php Passed 13 tests

The entry point to "NavThemes Widgets" version 1.3 is a PHP file that has certain tags in its header comment area
37 characters long description:
This Plugin add About Custom widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,297 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP17395331997
CSS17519274
JavaScript14026

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.41
Average class complexity22.75
▷ Minimum class complexity12.00
▷ Maximum class complexity42.00
Average method complexity6.44
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.19MB with 0.14MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png196.59KB54.91KB▼ 72.07%