58% post-builder-lite

Code Review | Post Builder Lite

WordPress plugin Post Builder Lite scored58%from 54 tests.

About plugin

  • Plugin page: post-builder-lite
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2021
  • Latest release: Jan 7, 2022
  • Number of updates: 19
  • Update frequency: every 1.2 days
  • Top authors: postbuilder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,110 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.75MB] [CPU: ▼61.21ms] Passed 4 tests

Analyzing server-side resources used by Post Builder Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.216.04 ▼38.40
Dashboard /wp-admin2.27 ▼1.079.68 ▼63.93
Posts /wp-admin/edit.php2.27 ▼1.088.07 ▼45.89
Add New Post /wp-admin/post-new.php2.27 ▼3.626.70 ▼96.62
Media Library /wp-admin/upload.php2.27 ▼0.967.27 ▼30.77

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2,263 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Post Builder Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,024 ▲23817.31 ▲2.9515.06 ▲13.2043.39 ▲2.55
Dashboard /wp-admin2,224 ▲476.39 ▲0.7398.62 ▲6.3537.34 ▼6.39
Posts /wp-admin/edit.php2,133 ▲333.12 ▲1.1044.38 ▲4.8136.05 ▼1.54
Add New Post /wp-admin/post-new.php1,636 ▲10823.50 ▲0.34679.22 ▲47.9342.83 ▼8.72
Media Library /wp-admin/upload.php1,436 ▲364.94 ▲0.69111.48 ▲3.4543.35 ▼4.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the pbf-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/post-builder-lite/vendor/squizlabs/php_codesniffer/scripts/build-phar.php
  • 1130× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Application' not found in wp-content/plugins/post-builder-lite/vendor/symfony/console/Tests/Fixtures/DescriptorApplication1.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\EventDispatcher\\EventDispatcher' not found in wp-content/plugins/post-builder-lite/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer_Exception' not found in wp-content/plugins/post-builder-lite/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Prophecy\\Exception\\Prophecy\\ObjectProphecyException' not found in wp-content/plugins/post-builder-lite/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Semver\\Constraint\\ConstraintInterface' not found in wp-content/plugins/post-builder-lite/vendor/composer/semver/src/Constraint/Constraint.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' not found in wp-content/plugins/post-builder-lite/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'phpDocumentor\\Reflection\\DocBlock\\Tags\\BaseTag' not found in wp-content/plugins/post-builder-lite/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer_Report' not found in wp-content/plugins/post-builder-lite/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/post-builder-lite/vendor/symfony/console/Tests/Helper/TableTest.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\AbstractFixer' not found in wp-content/plugins/post-builder-lite/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: design elements, post builder, amazon, affiliate

post-builder-lite/post-builder.php 92% from 13 tests

The entry point to "Post Builder Lite" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("post-builder-lite.php" instead of "post-builder.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/post-builder-lite/vendor/symfony/console/Resources/bin/hiddeninput.exe
    • .bat - Batch File in Windows
      • wp-content/plugins/post-builder-lite/vendor/squizlabs/php_codesniffer/scripts/phpcbf.bat
      • wp-content/plugins/post-builder-lite/vendor/squizlabs/php_codesniffer/scripts/phpcs.bat
215,028 lines of code in 2,052 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,59735,35279,695147,730
JavaScript5931846038,111
Markdown902,77309,879
JSON67705,228
XML1591711254,685
YAML40170893,461
TypeScript1003,036
reStructuredText58874371,301
CSS142283886
C1528223
XSD32931202
Ant6220147
m41111141
C/C++ Header112840
Bourne Shell21021
DOS Batch222216
Dockerfile18010
make1409
SVG2002

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 270)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.57
▷ Minimum class complexity1.00
▷ Maximum class complexity542.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity270.00
Code structure
Namespaces202
Interfaces122
Traits13
Classes1,430
▷ Abstract classes463.22%
▷ Concrete classes1,38496.78%
▷ Final classes44532.15%
Methods9,882
▷ Static methods9379.48%
▷ Public methods7,96280.57%
▷ Protected methods7347.43%
▷ Private methods1,18612.00%
Functions730
▷ Named functions16222.19%
▷ Anonymous functions56877.81%
Constants755
▷ Global constants11014.57%
▷ Class constants64585.43%
▷ Public constants645100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
imgs/logo.png10.57KB4.56KB▼ 56.87%
imgs/ama.png12.69KB8.32KB▼ 34.43%