79% wp-post-visits-wizard

Code Review | WP Post Visits Wizard

WordPress plugin WP Post Visits Wizard scored79%from 54 tests.

About plugin

  • Plugin page: wp-post-visits-wi...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: Apr 16, 2020
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: christianbaltazar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /450 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.54MB] [CPU: ▼15.29ms] Passed 4 tests

This is a short check of server-side resources used by WP Post Visits Wizard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1446.56 ▲3.57
Dashboard /wp-admin3.44 ▲0.1449.66 ▲2.04
Posts /wp-admin/edit.php3.56 ▲0.2049.28 ▼1.30
Add New Post /wp-admin/post-new.php3.32 ▼2.5640.46 ▼63.47
Media Library /wp-admin/upload.php3.37 ▲0.1439.88 ▲1.59
WP Post Visits Wizard /wp-admin/options-general.php?page=post-visits-wizard-admin3.3436.28

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Post Visits Wizard
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.41 ▼0.251.76 ▼0.1043.80 ▼0.39
Dashboard /wp-admin2,213 ▲584.89 ▼0.77106.50 ▲6.8540.41 ▼4.05
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0437.87 ▼3.2932.92 ▼6.03
Add New Post /wp-admin/post-new.php1,536 ▲323.31 ▲0.14654.20 ▼8.8957.45 ▲8.22
Media Library /wp-admin/upload.php1,395 ▲44.21 ▼0.0698.94 ▼4.7143.18 ▼1.80
WP Post Visits Wizard /wp-admin/options-general.php?page=post-visits-wizard-admin9502.5041.7768.29

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-post-visits-wizard/wp-post-visits-wizard.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-post-visits-wizard/src/templates/main-settings.php:63

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=post-visits-wizard-admin
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-post-visits-wizard//src/assets/font-awesome-4.7.0.min.css?ver=6.3.1 3:3 Uncaught SyntaxError: Invalid or unexpected token

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: sorting, visits, order, counter, posts

wp-post-visits-wizard/wp-post-visits-wizard.php Passed 13 tests

The primary PHP file in "WP Post Visits Wizard" version 1.0.1 is used by WordPress to initiate all plugin functionality
85 characters long description:
Light plugin to manage visits count for any post and order them as well while listing

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected10,129 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,1501,4989,373
PHP12188311725
Markdown113015
JSON20014
CSS2092

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.33
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods57
▷ Static methods58.77%
▷ Public methods4477.19%
▷ Protected methods00.00%
▷ Private methods1322.81%
Functions11
▷ Named functions19.09%
▷ Anonymous functions1090.91%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.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
No PNG images were found in this plugin