84% wp-readability-analysis

Code Review | WP Readability Analysis

WordPress plugin WP Readability Analysis scored84%from 54 tests.

About plugin

  • Plugin page: wp-readability-an...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2015
  • Latest release: Dec 6, 2015
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: SalvatoreDP (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,639 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by WP Readability Analysis
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.83 ▼3.44
Dashboard /wp-admin3.33 ▲0.0348.11 ▲0.40
Posts /wp-admin/edit.php3.38 ▲0.0347.03 ▼0.04
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.81 ▼4.68
Media Library /wp-admin/upload.php3.26 ▲0.0334.85 ▼0.62

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Readability Analysis
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.67 ▼0.731.71 ▼0.1844.88 ▲2.11
Dashboard /wp-admin2,209 ▲215.86 ▼0.01109.28 ▼9.0138.55 ▼7.65
Posts /wp-admin/edit.php2,089 ▼02.12 ▲0.0739.53 ▲2.1931.44 ▼2.99
Add New Post /wp-admin/post-new.php6,286 ▲4,75319.23 ▼4.11912.22 ▲262.9664.97 ▲13.60
Media Library /wp-admin/upload.php1,391 ▲64.22 ▲0.0198.36 ▼1.0042.72 ▲0.23

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

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

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-readability-analysis/SDPreadanalysis.php:18

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: readability, analysis

wp-readability-analysis/SDPreadanalysis.php 92% from 13 tests

The main PHP file in "WP Readability Analysis" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-readability-analysis.php" instead of "SDPreadanalysis.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin179 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34141179

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin