79% easy-post-views-count

Code Review | Easy Post Views Count

WordPress plugin Easy Post Views Count scored79%from 54 tests.

About plugin

  • Plugin page: easy-post-views-c...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Oct 18, 2017
  • Latest release: May 30, 2022
  • Number of updates: 21
  • Update frequency: every 80.3 days
  • Top authors: alphabposervice (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /20,350 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.60MB] [CPU: ▲22.64ms] Passed 4 tests

Analyzing server-side resources used by Easy Post Views Count
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /8.51 ▲5.0065.12 ▲22.69
Dashboard /wp-admin8.53 ▲5.1878.14 ▲30.19
Posts /wp-admin/edit.php8.53 ▲5.1375.78 ▲23.99
Add New Post /wp-admin/post-new.php9.03 ▲3.10112.98 ▲15.39
Media Library /wp-admin/upload.php8.53 ▲5.2664.28 ▲28.49
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5367.75

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 212 new files
Database: no new tables, 12 new options
New WordPress options
epvc_settings
fs_accounts
db_upgraded
fs_active_plugins
epvs_version
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
fs_debug_mode
...

Browser metrics Passed 4 tests

Checking browser requirements for Easy Post Views Count
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.35 ▼0.371.67 ▲0.0931.86 ▼10.07
Dashboard /wp-admin2,215 ▲385.54 ▼0.0486.21 ▼6.1960.15 ▲20.96
Posts /wp-admin/edit.php2,133 ▲332.03 ▲0.0435.85 ▼1.2032.02 ▲0.48
Add New Post /wp-admin/post-new.php1,707 ▲18123.08 ▼0.31712.18 ▲106.2278.18 ▲25.84
Media Library /wp-admin/upload.php1,429 ▲294.21 ▼0.04101.91 ▼1.9379.53 ▲36.27
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0661.6622.7327.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/easy-post-views-count/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_recent-posts
    • db_upgraded
    • fs_accounts
    • fs_debug_mode
    • fs_gdpr
    • epvs_version
    • can_compress_scripts
    • theysaidso_admin_options
    • epvc_settings
    • widget_recent-comments
    • ...

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: view, post count, custom post views, post views, easy post views count...

easy-post-views-count/easy-post-views-count.php 77% from 13 tests

"Easy Post Views Count" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected45,226 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1107,22416,20630,251
PO File105,5506,66712,010
Sass28399772,515
Markdown1680214
JavaScript33459194
JSON10027
CSS120015

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity86.79
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods1,142
▷ Static methods17315.15%
▷ Public methods80270.23%
▷ Protected methods151.31%
▷ Private methods32528.46%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants127
▷ Global constants10280.31%
▷ Class constants2519.69%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%