74% smart1waze-floating-widget

Code Review | Smart1Waze Floating Widget

WordPress plugin Smart1Waze Floating Widget scored74%from 54 tests.

About plugin

  • Plugin page: smart1waze-floati...
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Sep 13, 2018
  • Latest release: Sep 19, 2018
  • Number of updates: 9
  • Update frequency: every 0.8 days
  • Top authors: smart1lead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,016 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.92MB] [CPU: ▼60.87ms] Passed 4 tests

Server-side resources used by Smart1Waze Floating Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.19 ▼46.98
Dashboard /wp-admin2.09 ▼1.225.63 ▼48.93
Posts /wp-admin/edit.php2.09 ▼1.275.82 ▼43.65
Add New Post /wp-admin/post-new.php2.09 ▼3.805.47 ▼103.90
Media Library /wp-admin/upload.php2.09 ▼1.145.55 ▼28.76

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Smart1Waze Floating Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5014.35 ▼0.301.80 ▼0.0144.19 ▲0.24
Dashboard /wp-admin2,217 ▲405.64 ▲0.0689.26 ▼10.0241.46 ▼1.33
Posts /wp-admin/edit.php2,122 ▲222.03 ▼0.0037.92 ▲1.6536.63 ▲3.42
Add New Post /wp-admin/post-new.php6,239 ▲4,71118.70 ▼4.37921.41 ▲236.5457.62 ▼5.41
Media Library /wp-admin/upload.php1,416 ▲164.25 ▲0.05100.24 ▼12.2543.35 ▼4.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/smart1waze-floating-widget/smart1waze-widget.php+19
    Use of undefined constant SM1WAZE_BASE_DIR - assumed 'SM1WAZE_BASE_DIR' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/smart1waze-floating-widget/views/admin-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smart1waze-floating-widget/views/admin-edit-taxonomy-metabox.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smart1waze-floating-widget/views/admin-post-metabox.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart1waze-floating-widget/smart1waze-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/smart1waze-floating-widget/views/admin-edit-profile.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smart1waze-floating-widget/views/admin-add-taxonomy-metabox.php:2

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 Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: waze, waze widget

smart1waze-floating-widget/smart1waze-widget.php 85% from 13 tests

The principal PHP file in "Smart1Waze Floating Widget" v. 0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smart1waze-floating-widget.php" instead of "smart1waze-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,949 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS352531,305
PHP106634502
JavaScript290142

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity25.50
▷ Minimum class complexity12.00
▷ Maximum class complexity39.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/admin-icon.png2.79KB2.37KB▼ 15.19%