84% smart-syntax

Code Review | Smart Syntax

WordPress plugin Smart Syntax scored84%from 54 tests.

About plugin

  • Plugin page: smart-syntax
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2014
  • Latest release: Sep 27, 2016
  • Number of updates: 18
  • Update frequency: every 46.3 days
  • Top authors: smartpixels (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /3,375 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Smart Syntax
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0523.38 ▼13.84
Dashboard /wp-admin3.34 ▼0.0143.99 ▼17.11
Posts /wp-admin/edit.php3.39 ▲0.0345.64 ▼4.90
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.69 ▼6.16
Media Library /wp-admin/upload.php3.26 ▲0.0335.95 ▲2.24

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smart Syntax
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.22 ▼1.211.65 ▼0.1338.82 ▼0.23
Dashboard /wp-admin2,219 ▲274.84 ▼0.08107.90 ▼2.9742.35 ▼1.96
Posts /wp-admin/edit.php2,105 ▲162.02 ▲0.0140.46 ▼4.2735.87 ▼0.35
Add New Post /wp-admin/post-new.php1,527 ▲817.71 ▼5.53597.79 ▲24.0756.53 ▲7.55
Media Library /wp-admin/upload.php1,404 ▲164.16 ▼0.1893.75 ▼11.2541.87 ▲0.09

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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 trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/smart-syntax/smart_syntax.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: jetpack markdown, google prettify, markdown, syntax highlighter, code blocks...

smart-syntax/smart_syntax.php 85% from 13 tests

The main file in "Smart Syntax" v. 1.0.2 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:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smart-syntax.php" instead of "smart_syntax.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected303 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32945167
CSS101395
JavaScript10034
Markdown1507

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin