10% awesome-code-highlighting

Code Review | Awesome Code Highlighting

WordPress plugin Awesome Code Highlighting scored10%from 54 tests.

About plugin

  • Plugin page: awesome-code-high...
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.0
  • WordPress version: 6.3.1
  • First release: Jul 14, 2019
  • Latest release: Sep 22, 2021
  • Number of updates: 4
  • Update frequency: every 200.0 days
  • Top authors: rich_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /549 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/awesome-code-highlighting/index.php+13
    require_once(wp-content/plugins/awesome-code-highlighting/customizer.php): failed to open stream: No such file or directory

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

This is a short check of server-side resources used by Awesome Code Highlighting
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.77 ▼14.87
Dashboard /wp-admin3.31 ▼0.0447.92 ▼22.43
Posts /wp-admin/edit.php3.36 ▲0.0050.72 ▲0.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.76 ▼11.91
Media Library /wp-admin/upload.php3.23 ▲0.0037.52 ▲0.12

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 100 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Awesome Code Highlighting
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.15 ▼0.852.15 ▲0.4444.59 ▲0.82
Dashboard /wp-admin2,221 ▲185.84 ▼0.06101.87 ▼20.4539.90 ▼3.34
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0139.49 ▲2.5233.77 ▲2.94
Add New Post /wp-admin/post-new.php1,547 ▲423.15 ▲0.09627.30 ▼9.5345.47 ▼30.38
Media Library /wp-admin/upload.php1,400 ▼04.24 ▼0.09106.49 ▼8.9845.53 ▼3.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/awesome-code-highlighting/customizer.php' (include_path='.:/usr/share/php') in wp-content/plugins/awesome-code-highlighting/index.php on line 13
    • > PHP Warning
      require_once(wp-content/plugins/awesome-code-highlighting/customizer.php): failed to open stream: No such file or directory in wp-content/plugins/awesome-code-highlighting/index.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
1 plugin tags: code

awesome-code-highlighting/index.php 92% from 13 tests

The principal PHP file in "Awesome Code Highlighting" v. 0.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awesome-code-highlighting.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected7,494 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
CSS891,2016665,623
Markdown359411,834
PHP171031
JavaScript2016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
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%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/school-book.png0.47KB0.34KB▼ 27.37%
styles/brown-papersq.png17.77KB9.92KB▼ 44.16%