78% writing-guide

Code Review | Writing Guide

WordPress plugin Writing Guide scored 78% from 54 tests.

About plugin

  • Plugin page: writing-guide
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.1
  • WordPress version: 5.8.1
  • First release: May 5, 2015
  • Latest release: May 5, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: katsar0v (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 493 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.90MB] [CPU: ▼206.28ms] Passed 4 tests

A check of server-side resources used by Writing Guide
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0136.56 ▲1.57
Dashboard /wp-admin2.75 ▼0.3124.20 ▼27.21
Posts /wp-admin/edit.php2.75 ▼0.3622.01 ▼26.04
Add New Post /wp-admin/post-new.php2.75 ▼2.6922.52 ▼754.65
Media Library /wp-admin/upload.php2.75 ▼0.2620.58 ▼17.21

Server storage [IO: ▲0.00MB] [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: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Writing Guide
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9316.21 ▲0.687.88 ▼1.1554.22 ▼2.06
Dashboard /wp-admin2,977 ▲405.85 ▼0.11150.59 ▲0.54118.60 ▼4.97
Posts /wp-admin/edit.php2,749 ▲102.69 ▲0.0076.46 ▲8.9497.54 ▼0.20
Add New Post /wp-admin/post-new.php1,879 ▲19619.29 ▲0.83389.46 ▼1.93112.95 ▲1.40
Media Library /wp-admin/upload.php1,817 ▲105.04 ▲0.02166.01 ▲15.52125.29 ▼0.14
Writing Guide /wp-admin/my-plugin.php260.900.0513.22

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
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method WGuide::addSettings() should not be called statically

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/writing-guide/write-guide.php:15
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/writing-guide/settings.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/my-plugin.php
    • > Network (severe)
    wp-admin/my-plugin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === writing-guide === )
The official readme.txt is a good inspiration

writing-guide/write-guide.php 92% from 13 tests

"Writing Guide" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("writing-guide.php" instead of "write-guide.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected76 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP282745
JavaScript12025
CSS1126

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods342.86%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin