84% annytab-code-prettify

Code Review | Annytab Code Prettify

WordPress plugin Annytab Code Prettify scored84%from 54 tests.

About plugin

  • Plugin page: annytab-code-pret...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.6
  • WordPress version: 6.3.1
  • First release: Jul 24, 2020
  • Latest release: Nov 30, 2020
  • Number of updates: 7
  • Update frequency: every 18.6 days
  • Top authors: annytab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.43ms] Passed 4 tests

Analyzing server-side resources used by Annytab Code Prettify
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.68 ▲0.72
Dashboard /wp-admin3.31 ▲0.0149.28 ▼4.16
Posts /wp-admin/edit.php3.36 ▲0.0147.80 ▼7.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.51 ▼15.00
Media Library /wp-admin/upload.php3.24 ▲0.0140.77 ▲1.68

Server storage [IO: ▲0.08MB] [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: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Annytab Code Prettify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3413.77 ▼0.479.71 ▲8.0244.03 ▼1.40
Dashboard /wp-admin2,195 ▲155.52 ▼0.1083.98 ▼14.4238.43 ▼5.27
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0140.07 ▼0.3635.66 ▲0.42
Add New Post /wp-admin/post-new.php1,526 ▼022.76 ▼0.32659.89 ▲25.8254.93 ▲3.18
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.1896.15 ▼10.4642.96 ▲1.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/annytab-code-prettify/annytab-code-prettify.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: highlighting, prettify, beautify, code, pre

annytab-code-prettify/annytab-code-prettify.php 92% from 13 tests

The principal PHP file in "Annytab Code Prettify" v. 1.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,097 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41296491,026
CSS2102645
PHP1244126

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin