68% wp-postviews-data-delete

Code Review | Wp postviews data delete

WordPress plugin Wp postviews data delete scored68%from 54 tests.

About plugin

  • Plugin page: wp-postviews-data...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.4
  • WordPress version: 6.3.1
  • First release: Jan 9, 2016
  • Latest release: Dec 27, 2015
  • Number of updates: 2
  • Update frequency: every 6.0 days
  • Top authors: truser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /586 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: ▼0.93MB] [CPU: ▼35.31ms] Passed 4 tests

This is a short check of server-side resources used by Wp postviews data delete
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.81 ▼1.69
Dashboard /wp-admin3.01 ▼0.2922.33 ▼28.20
Posts /wp-admin/edit.php3.01 ▼0.3425.86 ▼22.77
Add New Post /wp-admin/post-new.php3.01 ▼2.8721.66 ▼72.44
Media Library /wp-admin/upload.php3.01 ▼0.2120.98 ▼17.81
Wp-postviews Data delete /wp-admin/options-general.php?page=wpajans_wppvdcr3.0123.45

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

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

Browser metrics Passed 4 tests

Wp postviews data delete: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.40 ▲0.451.67 ▲0.1145.96 ▼5.22
Dashboard /wp-admin2,196 ▲195.54 ▼0.0386.33 ▼6.5839.12 ▼2.70
Posts /wp-admin/edit.php2,104 ▲72.04 ▲0.0435.07 ▼0.7032.56 ▼7.36
Add New Post /wp-admin/post-new.php1,531 ▲523.42 ▲0.37674.10 ▼14.6452.35 ▼3.17
Media Library /wp-admin/upload.php1,407 ▲74.25 ▲0.0399.43 ▼15.6443.96 ▼5.00
Wp-postviews Data delete /wp-admin/options-general.php?page=wpajans_wppvdcr9712.0421.66113.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpajans_wppvdcr
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=wpajans_wppvdcr
    • > Notice in wp-content/plugins/wp-postviews-data-delete/index.php+76
    Undefined index: action

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-postviews-data-delete/index.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: faster, wordpress, faster site, wordpress optimization, optimization

wp-postviews-data-delete/index.php 92% from 13 tests

The principal PHP file in "Wp postviews data delete" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-postviews-data-delete.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,318 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS4197551,077
PO File3330114
PHP1171193
JavaScript2112034

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/relatedposts/ArrowNavigationEffects-300x162.png43.32KB18.84KB▼ 56.51%
images/dashboard.png1.56KB1.54KB▼ 1.13%
images/settings.png1.52KB1.62KB0.00%
images/moreplugins.png1.14KB1.14KB0.00%
img/relatedposts/DotNavigationStyles-300x162.png34.69KB22.26KB▼ 35.83%