62% symfopress-lite

Code Review | SymfoPress Lite

WordPress plugin SymfoPress Lite scored62%from 54 tests.

About plugin

  • Plugin page: symfopress-lite
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7
  • WordPress version: 6.3.1
  • First release: Dec 3, 2013
  • Latest release: Dec 6, 2013
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: netandreus (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /919 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.92MB] [CPU: ▼30.61ms] Passed 4 tests

This is a short check of server-side resources used by SymfoPress Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.43 ▲1.73
Dashboard /wp-admin3.02 ▼0.2826.07 ▼22.86
Posts /wp-admin/edit.php3.03 ▼0.3323.98 ▼21.88
Add New Post /wp-admin/post-new.php3.03 ▼2.8623.27 ▼66.11
Media Library /wp-admin/upload.php3.03 ▼0.2023.93 ▼11.59

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SymfoPress Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.561.63 ▼0.2038.96 ▼4.32
Dashboard /wp-admin2,210 ▲195.84 ▲0.83112.25 ▲7.7240.82 ▼2.00
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0133.38 ▼1.7235.50 ▲0.02
Add New Post /wp-admin/post-new.php1,522 ▲823.45 ▲5.94656.99 ▲57.6148.48 ▼1.19
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0598.25 ▼15.5845.06 ▼4.35
SymfoPress Lite /wp-admin/symfopress-lite.php260.440.3713.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% 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 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
Please fix the following
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/symfopress-lite/web/config.php
    • > /wp-content/plugins/symfopress-lite/app/check.php
    • > /wp-content/plugins/symfopress-lite/symfopress-lite.php
    • > /wp-content/plugins/symfopress-lite/validator.php
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      file_get_contents(wp-content/plugins/symfopress-lite/app/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php): failed to open stream: No such file or directory in wp-content/plugins/symfopress-lite/app/SymfonyRequirements.php on line 534
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/symfopress-lite/app/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/symfopress-lite/app/autoload.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' not found in wp-content/plugins/symfopress-lite/src/Netandreus/SymfopressBundle/DependencyInjection/NetandreusSymfopressExtension.php:15
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/symfopress-lite/app/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/symfopress-lite/app/autoload.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to a member function setParameter() on null in wp-content/plugins/symfopress-lite/app/config/wp-settings.php:19
    • > PHP Warning
      require(wp-content/plugins/symfopress-lite/app/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/symfopress-lite/app/autoload.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase' not found in wp-content/plugins/symfopress-lite/src/Netandreus/SymfopressBundle/Tests/Controller/DemoControllerTest.php:7
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/symfopress-lite/app/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/symfopress-lite/app/autoload.php on line 9
    • > PHP Warning
      file_get_contents(wp-content/plugins/symfopress-lite/app/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php): failed to open stream: No such file or directory in wp-content/plugins/symfopress-lite/app/SymfonyRequirements.php on line 534
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpKernel\\Kernel' not found in wp-content/plugins/symfopress-lite/app/AppKernel.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/symfopress-lite.php
    • > Network (severe)
    wp-admin/symfopress-lite.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This is a screen shot of SymfoPress Settings (Settings -> Symfopress). When plugin is activated you can install symfony 2 components (vendors).), #2 (Vendors are installed successfull. Now you can activate dispatching.), #3 (Dispatching activation.), #4 (Now dispatching activated. You can switch to demo page.), #5 (Symfony 2 demo page in your WordPress installation.)
The official readme.txt is a good inspiration

symfopress-lite/symfopress-lite.php Passed 13 tests

Analyzing the main PHP file in "SymfoPress Lite" version 1.0
34 characters long description:
Symfony 2 integration to WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,122 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP212313051,208
CSS6310566
YAML102639169
Twig514086
JSON10053
XML27640

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity8.73
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods55
▷ Static methods47.27%
▷ Public methods5294.55%
▷ Protected methods23.64%
▷ Private methods11.82%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 0.57MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
web/apple-touch-icon.png10.53KB5.12KB▼ 51.42%
web/bundles/framework/images/grey_magnifier.png0.38KB0.66KB0.00%
screenshot-4.png107.86KB29.30KB▼ 72.83%
screenshot-1.png107.75KB30.48KB▼ 71.71%
screenshot-5.png103.40KB29.09KB▼ 71.87%