83% perfect-tense

Code Review | Perfect Tense - Spelling and Grammar Checker

WordPress plugin Perfect Tense - Spelling and Grammar Checker scored83%from 54 tests.

About plugin

  • Plugin page: perfect-tense
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Jul 11, 2018
  • Number of updates: 12
  • Update frequency: every 0.3 days
  • Top authors: perfecttense (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,959 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.37MB] [CPU: ▲3.84ms] Passed 4 tests

A check of server-side resources used by Perfect Tense - Spelling and Grammar Checker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4042.92 ▲1.70
Dashboard /wp-admin3.71 ▲0.4054.75 ▲7.67
Posts /wp-admin/edit.php3.76 ▲0.4049.97 ▲8.48
Add New Post /wp-admin/post-new.php6.23 ▲0.3497.73 ▼0.11
Media Library /wp-admin/upload.php3.57 ▲0.3438.43 ▲6.11
Jobs /wp-admin/admin.php?page=perfect_tense_jobs3.5432.83
Settings /wp-admin/admin.php?page=perfect_tense_settings3.5436.42

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Perfect Tense - Spelling and Grammar Checker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲13113.39 ▼1.022.02 ▼0.2543.18 ▼1.23
Dashboard /wp-admin2,246 ▲645.11 ▼0.92104.92 ▼10.4574.67 ▲37.38
Posts /wp-admin/edit.php2,228 ▲1392.47 ▲0.4841.24 ▲0.7336.64 ▲0.48
Add New Post /wp-admin/post-new.php1,560 ▲2823.35 ▲0.08765.32 ▲172.2138.54 ▼20.75
Media Library /wp-admin/upload.php1,443 ▲554.44 ▲0.22102.85 ▼4.8774.01 ▲31.21
Jobs /wp-admin/admin.php?page=perfect_tense_jobs7181.537.0223.61
Settings /wp-admin/admin.php?page=perfect_tense_settings8892.0327.4328.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/perfect-tense/background_processing/wp-background-processing.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/perfect-tense/ptense_functionality_1.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/perfect-tense/perfect_tense.php:15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/perfect-tense/ptense_functionality_3.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/perfect-tense/background_processing/classes/wp-background-process.php:16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/perfect-tense/ptense_functionality_3.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/perfect-tense/ptense_functionality_3.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/perfect-tense/ptense_functionality_2.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: spelling, spell check, proofreading, grammar, seo

perfect-tense/perfect_tense.php 77% from 13 tests

The main file in "Perfect Tense - Spelling and Grammar Checker" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("perfect-tense.php" instead of "perfect_tense.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 197 characters long)

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 detected2,202 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP97391,3432,080
Markdown1540104
JSON10018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity21.00
▷ Minimum class complexity4.00
▷ Maximum class complexity58.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods125
▷ Static methods32.40%
▷ Public methods8971.20%
▷ Protected methods1915.20%
▷ Private methods1713.60%
Functions51
▷ Named functions4282.35%
▷ Anonymous functions917.65%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/PTENSE_logo_no_bg.png66.75KB15.45KB▼ 76.86%
images/PTENSE_logo_tall_no_bg.png47.20KB21.13KB▼ 55.24%
images/PTENSE_bulb_no_bg.png44.16KB11.64KB▼ 73.63%
images/PTENSE_bulb_small_no_bg.png1.42KB0.76KB▼ 46.59%