74% entry-views

Code Review | Entry Views

WordPress plugin Entry Views scored 74% from 54 tests.

About plugin

  • Plugin page: entry-views
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 5.9.2
  • First release: May 19, 2014
  • Latest release: May 20, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: greenshady (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20,000+ active / 165,219 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼2.30MB] [CPU: ▼339.46ms] Passed 4 tests

This is a short check of server-side resources used by Entry Views
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.447.45 ▼44.87
Dashboard /wp-admin2.09 ▼1.327.07 ▼25.70
Posts /wp-admin/edit.php2.09 ▼1.558.10 ▼27.93
Add New Post /wp-admin/post-new.php2.09 ▼4.887.28 ▼1,259.34
Media Library /wp-admin/upload.php2.09 ▼1.206.67 ▼18.11

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
widget_ev-entry-views

Browser metrics Passed 4 tests

A check of browser resources used by Entry Views
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲6116.01 ▲0.456.41 ▼0.182.13 ▼0.17
Dashboard /wp-admin2,895 ▲346.17 ▲0.00115.94 ▼20.49156.42 ▼10.61
Posts /wp-admin/edit.php2,691 ▼03.24 ▲0.0261.77 ▼2.95140.67 ▼1.70
Add New Post /wp-admin/post-new.php1,752 ▲3321.02 ▼1.78431.64 ▲20.03146.41 ▼14.09
Media Library /wp-admin/upload.php1,701 ▲95.52 ▼0.00155.24 ▲7.43189.50 ▲3.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5409
    The called constructor method for WP_Widget in EV_Widget_Entry_Views is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_ev-entry-views

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× 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/entry-views/entry-views.php:74
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/entry-views/inc/widget-entry-views.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/entry-views/inc/shortcodes.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 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: tracking, stats, post, posts, ajax...

entry-views/entry-views.php Passed 13 tests

The main PHP script in "Entry Views" version 1.0.0 is automatically included on every request by WordPress
57 characters long description:
A WordPress plugin for tracking the number of post views.

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
No dangerous file extensions were detected227 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP588303221
Markdown1506

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity9.00
▷ Minimum class complexity7.00
▷ Maximum class complexity11.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png6.72KB6.46KB▼ 3.92%
screenshot-1.png4.73KB4.68KB▼ 1.05%