84% editor-for-timber

Code Review | Editor for Timber

WordPress plugin Editor for Timber scored 84% from 54 tests.

About plugin

  • Plugin page: editor-for-timber
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2020
  • Latest release: Dec 16, 2020
  • Number of updates: 6
  • Update frequency: every 8.2 days
  • Top authors: drogueronin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 945 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Editor for Timber
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.04 ▼1.17
Dashboard /wp-admin3.31 ▲0.0144.38 ▼2.66
Posts /wp-admin/edit.php3.36 ▲0.0051.51 ▲4.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.52 ▼2.61
Media Library /wp-admin/upload.php3.23 ▲0.0037.03 ▲4.79

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 166 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Editor for Timber: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.57 ▼1.241.63 ▼0.4041.66 ▼3.31
Dashboard /wp-admin2,218 ▲305.85 ▼0.01108.91 ▼0.5642.61 ▼2.03
Posts /wp-admin/edit.php2,104 ▲152.00 ▼0.0141.84 ▲1.6236.45 ▼0.44
Add New Post /wp-admin/post-new.php1,531 ▼323.26 ▲0.22663.07 ▲19.3454.44 ▼5.72
Media Library /wp-admin/upload.php1,403 ▲184.20 ▼0.0298.79 ▼6.4343.89 ▼2.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/editor-for-timber/trunk/editor-for-timber.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/editor-for-timber/editor-for-timber.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: twig, templates, timber

editor-for-timber/editor-for-timber.php Passed 13 tests

This is the main PHP file of "Editor for Timber" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
23 characters long description:
Admin Editor for Timber

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected812 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP15136304717
CSS630063
JSON20031
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.93
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods94
▷ Static methods2021.28%
▷ Public methods9297.87%
▷ Protected methods00.00%
▷ Private methods22.13%
Functions16
▷ Named functions637.50%
▷ Anonymous functions1062.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin