84% post-view-count-editor

Code Review | Post View Count Editor

WordPress plugin Post View Count Editor scored84%from 54 tests.

About plugin

  • Plugin page: post-view-count-e...
  • Plugin version: 1.3
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Sep 9, 2020
  • Latest release: Sep 17, 2020
  • Number of updates: 7
  • Update frequency: every 1.1 days
  • Top authors: rainafarai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /447 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.70MB] [CPU: ▼18.10ms] Passed 4 tests

This is a short check of server-side resources used by Post View Count Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0061.34 ▲22.06
Dashboard /wp-admin3.31 ▲0.0143.65 ▼9.80
Posts /wp-admin/edit.php3.36 ▲0.0045.86 ▼1.28
Add New Post /wp-admin/post-new.php3.09 ▼2.7936.94 ▼63.98
Media Library /wp-admin/upload.php3.23 ▲0.0034.81 ▲2.67

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Post View Count Editor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.21 ▼1.341.76 ▼0.0438.50 ▼10.91
Dashboard /wp-admin2,203 ▲185.83 ▲0.9598.01 ▼18.4437.30 ▼8.47
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0638.58 ▲0.8836.11 ▲3.17
Add New Post /wp-admin/post-new.php6,293 ▲4,76019.20 ▼3.96877.20 ▲217.2855.53 ▲7.65
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0098.97 ▼13.6645.95 ▼4.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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
Even though no errors were found, this is by no means 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-view-count-editor/index.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% 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
7 plugin tags: post, product woocommerce, events, views, counter editor...

post-view-count-editor/index.php 92% from 13 tests

The entry point to "Post View Count Editor" version 1.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("post-view-count-editor.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected48 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1301548

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected