10% seedsugar-phphamlsass-4-wp

Code Review | seedsugar-phphamlsass for WordPress

WordPress plugin seedsugar-phphamlsass for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: seedsugar-phphaml...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2013
  • Latest release: Mar 12, 2013
  • Number of updates: 16
  • Update frequency: every 0.3 days
  • Top authors: derDoc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /861 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
These installer errors require your attention
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/seedsugar-phphamlsass-4-wp/phphaml4wp.php+242
    syntax error, unexpected 'yield' (T_YIELD), expecting '('

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

Analyzing server-side resources used by seedsugar-phphamlsass for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.21 ▲3.39
Dashboard /wp-admin3.31 ▼0.0446.83 ▼10.88
Posts /wp-admin/edit.php3.36 ▲0.0046.38 ▲3.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.15 ▼14.24
Media Library /wp-admin/upload.php3.23 ▲0.0033.39 ▼1.62

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for seedsugar-phphamlsass for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.021.70 ▲0.0644.46 ▲7.04
Dashboard /wp-admin2,192 ▲145.54 ▼0.1298.13 ▼21.9740.52 ▼5.32
Posts /wp-admin/edit.php2,103 ▲62.11 ▲0.1234.46 ▼1.7735.95 ▲2.46
Add New Post /wp-admin/post-new.php1,526 ▼923.11 ▲4.59600.19 ▼87.3251.76 ▼18.01
Media Library /wp-admin/upload.php1,400 ▼34.21 ▼0.0093.21 ▼8.4140.38 ▼1.45

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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)
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SassRenderer' not found in wp-content/plugins/seedsugar-phphamlsass-4-wp/includes/sass/renderers/SassCompressedRenderer.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/seedsugar-phphamlsass-4-wp/includes/sass/tree/SassExtendNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/seedsugar-phphamlsass-4-wp/includes/sass/tree/SassIfNode.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/seedsugar-phphamlsass-4-wp/includes/sass/tree/SassMixinDefinitionNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/seedsugar-phphamlsass-4-wp/includes/sass/tree/SassVariableNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/seedsugar-phphamlsass-4-wp/includes/sass/tree/SassDirectiveNode.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/seedsugar-phphamlsass-4-wp/ph4wp_admin.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/seedsugar-phphamlsass-4-wp/includes/sass/tree/SassWhileNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassLiteral' not found in wp-content/plugins/seedsugar-phphamlsass-4-wp/includes/sass/extensions/compass/functions/colourStops.php:17
    • > PHP Parse error
      syntax error, unexpected 'yield' (T_YIELD), expecting '(' in wp-content/plugins/seedsugar-phphamlsass-4-wp/phphaml4wp.php on line 242

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: phphaml, sass, theme, themes, phamlp...

seedsugar-phphamlsass-4-wp/phphaml4wp.php 85% from 13 tests

"seedsugar-phphamlsass for WordPress" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("seedsugar-phphamlsass-4-wp.php" instead of "phphaml4wp.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 163 characters long)

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
Success! There were no dangerous files found in this plugin8,150 lines of code in 183 files:
LanguageFilesBlank linesComment linesLines of code
PHP711,1255,1545,871
Sass943681,0172,022
Ruby9561129
Haml527287
Markdown17025
XML10014
CSS24202

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.85
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes84
▷ Abstract classes55.95%
▷ Concrete classes7994.05%
▷ Final classes00.00%
Methods507
▷ Static methods10019.72%
▷ Public methods41581.85%
▷ Protected methods428.28%
▷ Private methods509.86%
Functions47
▷ Named functions4493.62%
▷ Anonymous functions36.38%
Constants159
▷ Global constants106.29%
▷ Class constants14993.71%
▷ Public constants149100.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
14 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/pdf.png0.58KB0.57KB▼ 1.02%
includes/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/visited.png45.89KB0.13KB▼ 99.72%
includes/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/feed.png0.67KB0.90KB0.00%
includes/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/external.png45.75KB0.11KB▼ 99.77%
includes/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons/cross.png0.64KB0.72KB0.00%