78% pcsh-pastacode-syntaxhighlighter

Code Review | PCSH (PastaCode and SyntaxHighlighter)

WordPress plugin PCSH (PastaCode and SyntaxHighlighter) scored78%from 54 tests.

About plugin

  • Plugin page: pcsh-pastacode-sy...
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.4
  • WordPress version: 6.3.1
  • First release: Nov 19, 2014
  • Latest release: Dec 10, 2015
  • Number of updates: 24
  • Update frequency: every 16.1 days
  • Top authors: webaib (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,954 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
Installer ran successfully

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

A check of server-side resources used by PCSH (PastaCode and SyntaxHighlighter)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.98 ▼0.21
Dashboard /wp-admin3.43 ▲0.1251.11 ▼0.53
Posts /wp-admin/edit.php3.54 ▲0.1949.77 ▼4.96
Add New Post /wp-admin/post-new.php6.02 ▲0.1488.04 ▼6.28
Media Library /wp-admin/upload.php3.35 ▲0.1240.90 ▲4.51
PCSH /wp-admin/options-general.php?page=pcsh3.2933.13

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 58 new files
Database: no new tables, 8 new options
New WordPress options
pcsh_cache_duration
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
pcsh_style
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PCSH (PastaCode and SyntaxHighlighter)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.34 ▼0.962.00 ▼0.2544.57 ▼0.70
Dashboard /wp-admin2,218 ▲334.86 ▼1.02115.56 ▲10.8844.96 ▲3.83
Posts /wp-admin/edit.php2,095 ▲32.01 ▼0.0435.75 ▼9.8936.41 ▲0.61
Add New Post /wp-admin/post-new.php1,535 ▲1617.75 ▼5.50663.59 ▲31.8463.71 ▲14.12
Media Library /wp-admin/upload.php1,388 ▲64.19 ▼0.1098.94 ▼5.7941.89 ▼0.88
PCSH /wp-admin/options-general.php?page=pcsh8782.0225.5827.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=pcsh
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=pcsh
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please take a closer look at the following
  • 1× 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/pcsh-pastacode-syntaxhighlighter/pastacodeSH.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: github, syntaxique coloration, syntaxhighlighter, gist, code...

pcsh-pastacode-syntaxhighlighter/pastacodeSH.php 85% from 13 tests

"PCSH (PastaCode and SyntaxHighlighter)" version 0.4.2'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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pcsh-pastacode-syntaxhighlighter.php" instead of "pastacodeSH.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin5,651 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
CSS18312723,546
JavaScript292185271,239
PHP2121217681
PO File284206180
XML1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pcsh-placeholder.png1.73KB0.93KB▼ 46.08%
images/pcsh_logo.png0.52KB0.44KB▼ 15.47%