74% sm-post-view-count

Code Review | SM Post View Count

WordPress plugin SM Post View Count scored74%from 54 tests.

About plugin

  • Plugin page: sm-post-view-count
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Oct 17, 2017
  • Latest release: Oct 17, 2017
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: mahabubs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /537 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 gracefully, with no errors

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

A check of server-side resources used by SM Post View Count
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.59 ▲2.72
Dashboard /wp-admin3.31 ▲0.0148.40 ▼5.66
Posts /wp-admin/edit.php3.36 ▲0.0050.55 ▼5.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.65 ▲8.45
Media Library /wp-admin/upload.php3.23 ▲0.0035.49 ▼3.87

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: 2 new tables, 6 new options
New tables
wp_spvc_total
wp_spvc_details
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for SM Post View Count
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5113.32 ▼1.061.87 ▲0.2044.24 ▼0.06
Dashboard /wp-admin2,209 ▲244.85 ▼1.04101.69 ▼14.4341.38 ▼1.45
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0040.82 ▲2.5135.40 ▲2.83
Add New Post /wp-admin/post-new.php1,520 ▼1323.09 ▼0.20646.78 ▼35.1652.80 ▼0.08
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0896.35 ▼15.4341.42 ▼7.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_spvc_total
    • wp_spvc_details
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sm-post-view-count/sm-post-view-count.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: plugin, counter, post counter, view counter

sm-post-view-count/sm-post-view-count.php Passed 13 tests

The main file in "SM Post View Count" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
38 characters long description:
Post view counter plugin for wordpress

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
Everything looks great! No dangerous files found in this plugin97 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131397

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin