74% easy-post-view-counter

Code Review | Easy Post View Counter

WordPress plugin Easy Post View Counter scored74%from 54 tests.

About plugin

  • Plugin page: easy-post-view-co...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.1.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2014
  • Latest release: Apr 7, 2015
  • Number of updates: 19
  • Update frequency: every 23.0 days
  • Top authors: MGertz (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /10,158 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.78ms] Passed 4 tests

A check of server-side resources used by Easy Post View Counter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.70 ▼4.06
Dashboard /wp-admin3.33 ▲0.0349.08 ▼1.68
Posts /wp-admin/edit.php3.36 ▲0.0147.17 ▼3.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.88 ▼17.90
Media Library /wp-admin/upload.php3.26 ▲0.0335.36 ▼1.92

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Easy Post View Counter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.381.72 ▼0.2342.51 ▼0.72
Dashboard /wp-admin2,198 ▲215.55 ▲0.0386.59 ▼9.1139.63 ▲0.88
Posts /wp-admin/edit.php2,113 ▲102.00 ▼0.0435.29 ▼4.4534.27 ▼5.50
Add New Post /wp-admin/post-new.php1,530 ▼622.06 ▲4.20692.29 ▲43.2453.19 ▼13.47
Media Library /wp-admin/upload.php1,397 ▼34.36 ▲0.18100.10 ▼2.9244.24 ▲0.92

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/easy-post-view-counter/EasyPostViewCounter.php+24
    Undefined index: EasyPostViewCounter_0
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-post-view-counter/EasyPostViewCounter.php:30

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: post hits, post counter, postviews, view counter, post views

easy-post-view-counter/EasyPostViewCounter.php 92% from 13 tests

The main PHP file in "Easy Post View Counter" ver. 1.2.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-post-view-counter.php" instead of "EasyPostViewCounter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected47 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171847

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin