94% post-reading-time-admin-panel

Code Review | Post Reading Time Admin Panel

WordPress plugin Post Reading Time Admin Panel scored 94% from 54 tests.

About plugin

  • Plugin page: post-reading-time...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Sep 26, 2016
  • Latest release: Sep 26, 2016
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: longtailmarketing (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 2,850 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.34MB] [CPU: ▼151.21ms] Passed 4 tests

This is a short check of server-side resources used by Post Reading Time Admin Panel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1438.50 ▲14.01
Dashboard /wp-admin3.08 ▲0.0350.93 ▲5.10
Posts /wp-admin/edit.php3.07 ▼0.0443.76 ▼1.48
Add New Post /wp-admin/post-new.php4.07 ▼1.3748.93 ▼603.86
Media Library /wp-admin/upload.php3.03 ▲0.0237.20 ▼4.60

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
_prtap_post_estimated_reading_time

Browser metrics Passed 4 tests

An overview of browser requirements for Post Reading Time Admin Panel
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲9715.88 ▲0.398.13 ▼0.5549.72 ▼3.98
Dashboard /wp-admin2,970 ▲365.90 ▼0.16143.34 ▼25.90122.01 ▲3.67
Posts /wp-admin/edit.php2,754 ▲152.68 ▼0.0275.61 ▲1.9493.79 ▼1.69
Add New Post /wp-admin/post-new.php1,724 ▲4116.94 ▼1.85365.09 ▼9.53126.13 ▲12.02
Media Library /wp-admin/upload.php1,810 ▲34.95 ▼0.08148.13 ▼6.46121.01 ▼4.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/post-reading-time-admin-panel/post-reading-time-admin-panel.php:23

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Version not formatted correctly
  • Screenshots: These screenshots do not have images: #1 (The admin area list of posts), #2 (The admin area add/edit post and also change Reading speed (words per minute))
You can take inspiration from this readme.txt

post-reading-time-admin-panel/post-reading-time-admin-panel.php Passed 13 tests

"Post Reading Time Admin Panel" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
84 characters long description:
Allows admin to see an estimate of the time it would take a user to read their post.

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
Good job! No executable or dangerous file extensions detected99 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2482699

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png121.71KB69.61KB▼ 42.80%
screenshot-1.png35.26KB19.68KB▼ 44.18%