84% wp-jade-template

Code Review | WP Jade Template

WordPress plugin WP Jade Template scored84%from 54 tests.

About plugin

  • Plugin page: wp-jade-template
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.9
  • WordPress version: 6.3.1
  • First release: Dec 4, 2014
  • Latest release: Dec 4, 2014
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: xingxing2d (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /925 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.07MB] [CPU: ▼7.49ms] Passed 4 tests

Server-side resources used by WP Jade Template
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.11 ▼0.3520.07 ▼23.32
Dashboard /wp-admin3.33 ▲0.0347.13 ▼4.43
Posts /wp-admin/edit.php3.38 ▲0.0347.23 ▼0.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.15 ▼2.07
Media Library /wp-admin/upload.php3.25 ▲0.0334.42 ▼0.14

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Jade Template
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.151.51 ▼0.1337.80 ▼6.50
Dashboard /wp-admin2,203 ▲114.83 ▼0.09109.62 ▲0.2240.36 ▼1.14
Posts /wp-admin/edit.php2,089 ▼31.97 ▼0.0339.23 ▲2.3035.70 ▲3.63
Add New Post /wp-admin/post-new.php1,514 ▼1917.67 ▼5.84681.27 ▲13.1050.79 ▼11.57
Media Library /wp-admin/upload.php1,388 ▼34.27 ▲0.0495.14 ▼15.3842.65 ▼3.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-jade-template/phpjade/src/Everzet/Jade/Parser.php on line 277
    • > PHP Fatal error
      Uncaught Error: Interface 'Everzet\\Jade\\Visitor\\VisitorInterface' not found in wp-content/plugins/wp-jade-template/phpjade/src/Everzet/Jade/Visitor/AutotagsVisitor.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-jade-template/index.php:59
    • > PHP Fatal error
      Uncaught Error: Interface 'Everzet\\Jade\\Filter\\FilterInterface' not found in wp-content/plugins/wp-jade-template/phpjade/src/Everzet/Jade/Filter/PHPFilter.php:16
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-jade-template/phpjade/src/Everzet/Jade/Parser.php on line 282
    • > PHP Fatal error
      Uncaught Error: Class 'Everzet\\Jade\ode\ode' not found in wp-content/plugins/wp-jade-template/phpjade/src/Everzet/Jade/Node/CodeNode.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-jade-template/phpjade/tests/Everzet/Jade/JadeTest.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Everzet\\Jade\ode\ode' not found in wp-content/plugins/wp-jade-template/phpjade/src/Everzet/Jade/Node/CommentNode.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Everzet\\Jade\ode\ode' not found in wp-content/plugins/wp-jade-template/phpjade/src/Everzet/Jade/Node/FilterNode.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Everzet\\Jade\ode\ode' not found in wp-content/plugins/wp-jade-template/phpjade/src/Everzet/Jade/Node/BlockNode.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
4 plugin tags: page, template, jade, advanced

wp-jade-template/index.php 92% from 13 tests

"WP Jade Template" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-jade-template.php" instead of "index.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
Success! There were no dangerous files found in this plugin2,295 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP274101,0042,047
Markdown11110225
XML12023

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.20
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces8
Interfaces4
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods143
▷ Static methods00.00%
▷ Public methods9767.83%
▷ Protected methods4632.17%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
No PNG files were detected