83% simplecodesyntax

Code Review | SimpleCodeSyntax

WordPress plugin SimpleCodeSyntax scored83%from 54 tests.

About plugin

  • Plugin page: simplecodesyntax
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2023
  • Latest release: Mar 16, 2023
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: sharadchhetri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /88 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.73ms] Passed 4 tests

An overview of server-side resources used by SimpleCodeSyntax
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.64 ▼0.64
Dashboard /wp-admin3.31 ▲0.0041.88 ▼8.19
Posts /wp-admin/edit.php3.36 ▲0.0046.30 ▼4.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.63 ▼9.77
Media Library /wp-admin/upload.php3.23 ▲0.0033.53 ▼0.89

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by SimpleCodeSyntax
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.24 ▼1.131.61 ▼0.2639.17 ▼6.54
Dashboard /wp-admin2,206 ▲185.90 ▲1.01114.17 ▲6.6842.13 ▲1.05
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0234.46 ▼1.8929.90 ▼3.08
Add New Post /wp-admin/post-new.php1,542 ▲1423.17 ▼0.10677.14 ▼2.9561.65 ▲1.15
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0492.94 ▼15.1040.80 ▼9.63

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simplecodesyntax/SimpleCodeSyntax.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (SimpleCodeSyntax Plugin.Screenshot-1 showing Pre and Code tag example.) image missing
  • Plugin Name: Please specify the plugin name on the first line ( === simplecodesyntax === )
You can take inspiration from this readme.txt

simplecodesyntax/SimpleCodeSyntax.php 92% from 13 tests

The main file in "SimpleCodeSyntax" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simplecodesyntax.php" instead of "SimpleCodeSyntax.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected26 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS10013
PHP13913

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png79.10KB30.62KB▼ 61.28%