84% timber-library

Code Review | Timber

WordPress plugin Timber scored84%from 54 tests.

About plugin

  • Plugin page: timber-library
  • Plugin version: 1.23.0
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2013
  • Latest release: Oct 20, 2023
  • Number of updates: 859
  • Update frequency: every 4.4 days
  • Top authors: jarednova (99.65%)

Code review

54 tests

User reviews

70 reviews

Install metrics

50,000+ active /1,188,316 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.24MB] [CPU: ▲0.20ms] Passed 4 tests

Analyzing server-side resources used by Timber
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.74 ▲1.2850.41 ▲11.07
Dashboard /wp-admin4.58 ▲1.2451.61 ▼11.91
Posts /wp-admin/edit.php4.63 ▲1.2858.98 ▲10.80
Add New Post /wp-admin/post-new.php7.10 ▲1.2289.63 ▼9.16
Media Library /wp-admin/upload.php4.44 ▲1.2146.13 ▲12.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 664 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Timber
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.151.72 ▲0.1744.02 ▲4.34
Dashboard /wp-admin2,195 ▲175.58 ▼0.1681.44 ▼38.6436.58 ▼8.26
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0337.19 ▲3.2335.81 ▼0.03
Add New Post /wp-admin/post-new.php1,526 ▼023.74 ▲0.82679.85 ▲32.6156.90 ▲3.84
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.01107.06 ▲13.4545.76 ▲3.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 317× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\CacheExtension\\Exception\\BaseException' not found in wp-content/plugins/timber-library/vendor/twig/cache-extension/lib/Twig/CacheExtension/Exception/InvalidCacheKeyException.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/timber-library/vendor/twig/cache-extension/test/Twig/CacheExtension/Tests/CacheStrategy/LifetimeCacheStrategyTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/timber-library/vendor/twig/twig/src/Node/Expression/TempNameExpression.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\CacheExtension\\CacheStrategyInterface' not found in wp-content/plugins/timber-library/vendor/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/BlackholeCacheStrategy.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\CacheExtension\\CacheStrategyInterface' not found in wp-content/plugins/timber-library/vendor/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/IndexedChainingCacheStrategy.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/timber-library/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/timber-library/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/timber-library/vendor/twig/twig/src/TokenParser/ForTokenParser.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/timber-library/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/timber-library/vendor/twig/twig/src/Node/Expression/ParentExpression.php:22

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 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
3 plugin tags: twig, template engine, templates

timber-library/timber.php 92% from 13 tests

The main PHP file in "Timber" ver. 1.23.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("timber-library.php" instead of "timber.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin25,125 lines of code in 642 files:
LanguageFilesBlank linesComment linesLines of code
PHP5855,66911,68523,042
JSON700846
Markdown71900459
YAML9860311
Twig25299288
Bourne Shell122686
XML42369
reStructuredText19513
HTML1109
JavaScript1212
CSS1050

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity5.92
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces40
Interfaces31
Traits0
Classes532
▷ Abstract classes173.20%
▷ Concrete classes51596.80%
▷ Final classes40.78%
Methods1,719
▷ Static methods22613.15%
▷ Public methods1,43483.42%
▷ Protected methods24514.25%
▷ Private methods402.33%
Functions135
▷ Named functions8260.74%
▷ Anonymous functions5339.26%
Constants61
▷ Global constants23.28%
▷ Class constants5996.72%
▷ Public constants59100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
timber-starter-theme/screenshot.png12.73KB6.31KB▼ 50.43%