90% computy-view-percent

Code Review | Computy view percent

WordPress plugin Computy view percent scored90%from 54 tests.

About plugin

  • Plugin page: computy-view-percent
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 26, 2020
  • Latest release: Aug 18, 2023
  • Number of updates: 11
  • Update frequency: every 112.7 days
  • Top authors: calliko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.70ms] Passed 4 tests

An overview of server-side resources used by Computy view percent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.36 ▼1.24
Dashboard /wp-admin3.35 ▲0.0549.39 ▼6.07
Posts /wp-admin/edit.php3.40 ▲0.0451.58 ▲0.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.79 ▼8.47
Media Library /wp-admin/upload.php3.27 ▲0.0443.36 ▲9.66
View percent /wp-admin/options-general.php?page=vp-plugin-options3.2433.57

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

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

Browser metrics Passed 4 tests

Computy view percent: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.10 ▼1.275.43 ▲3.7744.37 ▲1.19
Dashboard /wp-admin2,209 ▲245.82 ▲0.0095.88 ▼12.0339.11 ▼6.27
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0238.22 ▼0.4736.70 ▲3.25
Add New Post /wp-admin/post-new.php1,533 ▲1923.13 ▲5.61681.30 ▼27.5052.92 ▼6.77
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0597.63 ▼17.7443.15 ▼4.01
View percent /wp-admin/options-general.php?page=vp-plugin-options9102.1924.8730.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 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
3 plugin tags: scroll line, percentage of reading, view percent

computy-view-percent/computy-view-percent.php Passed 13 tests

The main PHP script in "Computy view percent" version 1.5.1 is automatically included on every request by WordPress
94 characters long description:
The plugin does not require any settings and works automatically for standard WordPress posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected179 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22318152
SVG10119
CSS1108

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/1.png42.71KB17.14KB▼ 59.88%