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: 6.3.1
  • 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

10,000+ active / 182,218 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.65MB] [CPU: ▼46.72ms] Passed 4 tests

A check of server-side resources used by Entry Views
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.34 ▼1.128.83 ▼31.00
Dashboard /wp-admin2.35 ▼0.9511.40 ▼37.28
Posts /wp-admin/edit.php2.35 ▼1.0011.58 ▼35.44
Add New Post /wp-admin/post-new.php2.35 ▼3.5311.60 ▼83.17
Media Library /wp-admin/upload.php2.35 ▼0.8811.04 ▼23.65

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_ev-entry-views
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Entry Views: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.121.91 ▲0.3041.35 ▼6.85
Dashboard /wp-admin2,203 ▲125.79 ▼0.1198.32 ▼0.2337.92 ▼10.73
Posts /wp-admin/edit.php2,086 ▼62.04 ▼0.0138.15 ▼3.2034.72 ▼4.47
Add New Post /wp-admin/post-new.php1,534 ▼323.20 ▼0.04661.53 ▲36.5952.76 ▲3.02
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0395.22 ▼3.8843.46 ▼1.26

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
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in EV_Widget_Entry_Views is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_ev-entry-views
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > 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
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/entry-views/entry-views.php:74

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: tracking, post, posts, counter, statistics...

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 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin227 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP588303221
Markdown1506

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png4.73KB4.68KB▼ 1.05%
screenshot-2.png6.72KB6.46KB▼ 3.92%