78% proofreading

Code Review | Proofreading

WordPress plugin Proofreading scored78%from 54 tests.

About plugin

  • Plugin page: proofreading
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 23, 2018
  • Latest release: Oct 13, 2023
  • Number of updates: 45
  • Update frequency: every 45.7 days
  • Top authors: scribit (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

7,000+ active /8,100 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.40ms] Passed 4 tests

An overview of server-side resources used by Proofreading
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.86 ▲0.85
Dashboard /wp-admin3.43 ▲0.1355.69 ▲5.85
Posts /wp-admin/edit.php3.55 ▲0.1947.85 ▼7.51
Add New Post /wp-admin/post-new.php6.11 ▲0.2292.44 ▼2.23
Media Library /wp-admin/upload.php3.36 ▲0.1334.80 ▼4.70
Proofreading /wp-admin/options-general.php?page=proofreading3.3434.67

Server storage [IO: ▲0.18MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 41 new files
Database: 3 new tables, 8 new options
New tables
wp_proofreading_rules
wp_proofreading_languages
wp_proofreading_rules_settings
New WordPress options
proofreading-language-default
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
proofreading-version
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Proofreading
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,787 ▲2614.34 ▼0.011.89 ▲0.1443.50 ▲0.28
Dashboard /wp-admin2,196 ▲195.59 ▼0.0883.67 ▼12.3337.90 ▲0.14
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0335.07 ▼6.2131.63 ▼9.94
Add New Post /wp-admin/post-new.php6,493 ▲4,96527.54 ▲4.19977.23 ▲279.0666.84 ▲13.44
Media Library /wp-admin/upload.php1,395 ▼54.19 ▼0.0299.92 ▼7.2841.45 ▼5.40
Proofreading /wp-admin/options-general.php?page=proofreading1,2022.2531.3726.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/proofreading/public/partials/proofreading-public-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/proofreading/admin/includes/class-proofreading-metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/proofreading/admin/includes/class-ajax-handler.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

proofreading/proofreading.php 92% from 13 tests

The principal PHP file in "Proofreading" v. 1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 226 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,971 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP17271504823
PO File3125148365
JavaScript55632304
SQL1170276
CSS2257203

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.55
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods45
▷ Static methods24.44%
▷ Public methods3884.44%
▷ Protected methods00.00%
▷ Private methods715.56%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/eye.png0.31KB0.36KB0.00%
admin/images/language.png1.58KB1.30KB▼ 17.53%
admin/images/logo_scribit.png1.98KB1.98KB0.34%
admin/images/logo.png4.69KB3.27KB▼ 30.35%