78% css-magician

Code Review | Css Magician Page Builder

WordPress plugin Css Magician Page Builder scored78%from 54 tests.

About plugin

  • Plugin page: css-magician
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Jul 16, 2020
  • Latest release: Aug 10, 2020
  • Number of updates: 16
  • Update frequency: every 8.2 days
  • Top authors: prestamagician (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /548 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼11.85ms] Passed 4 tests

Analyzing server-side resources used by Css Magician Page Builder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.38 ▼0.82
Dashboard /wp-admin3.39 ▲0.0943.75 ▼14.34
Posts /wp-admin/edit.php3.50 ▲0.1547.33 ▼3.78
Add New Post /wp-admin/post-new.php5.97 ▲0.0984.14 ▼28.45
Media Library /wp-admin/upload.php3.31 ▲0.0937.92 ▲2.26

Server storage [IO: ▲12.36MB] [DB: ▲0.06MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 584 new files
Database: 4 new tables, 8 new options
New tables
wp_cssm_ultimateconfigurator_themes_css
wp_cssm_ultimateconfigurator_animator
wp_cssm_ultimateconfigurator_themes
wp_cssm_ultimateconfigurator_block
New WordPress options
widget_theysaidso_widget
cssm_db_version
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
CSSM_VERSION_KEY
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Css Magician Page Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.27 ▼1.124.41 ▲2.4942.16 ▼1.73
Dashboard /wp-admin2,231 ▲464.96 ▼0.9098.82 ▼2.8937.71 ▼5.17
Posts /wp-admin/edit.php2,117 ▲282.37 ▲0.3938.89 ▼2.2534.52 ▼1.14
Add New Post /wp-admin/post-new.php1,539 ▼323.17 ▲4.76651.06 ▲30.8935.89 ▼17.60
Media Library /wp-admin/upload.php1,413 ▲224.30 ▲0.09101.63 ▲2.7544.69 ▲0.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • CSSM_VERSION_KEY
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • cssm_db_version
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 82× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/css-magician/views/widgets/sectionBackgroundWidget.php
    • > /wp-content/plugins/css-magician/lib/imgallery.php
    • > /wp-content/plugins/css-magician/controllers/admin/cssm-admin-installdb.php
    • > /wp-content/plugins/css-magician/views/help/imagetextWidget.php
    • > /wp-content/plugins/css-magician/views/widgets/particlesWidget.php
    • > /wp-content/plugins/css-magician/lib/videogallery.php
    • > /wp-content/plugins/css-magician/views/help/stylizer-shadow.php
    • > /wp-content/plugins/css-magician/views/help/stylizer-border.php
    • > /wp-content/plugins/css-magician/views/help/svgWidget.php
    • > /wp-content/plugins/css-magician/views/help/sliderWidget.php
  • 37× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant CSSM_PLUGIN_DIR_PATH - assumed 'CSSM_PLUGIN_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/css-magician/vendor/enshrined/svg-sanitize/src/Sanitizer.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'CSSM_PLUGIN_DIR_PATHvendor/enshrined/svg-sanitize/src/data/AllowedAttributes.php' (include_path='.:/usr/share/php') in wp-content/plugins/css-magician/vendor/enshrined/svg-sanitize/src/Sanitizer.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'CssCrush\\Iterator' not found in wp-content/plugins/css-magician/lib/csscrush/lib/CssCrush/SelectorList.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function csscrush_plugin() in wp-content/plugins/css-magician/lib/csscrush/plugins/aria.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CssCrush\\IO' not found in wp-content/plugins/css-magician/lib/csscrush/lib/CssCrush/IO/Watch.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CssCrush\\Iterator' not found in wp-content/plugins/css-magician/lib/csscrush/lib/CssCrush/Collection.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/css-magician/views/help/vmutc_stylizer_help.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'CssCrush\\Template' not found in wp-content/plugins/css-magician/lib/csscrush/lib/CssCrush/Fragment.php:9
    • > PHP Fatal error
      Trait 'CssCrush\\EventEmitter' not found in wp-content/plugins/css-magician/lib/csscrush/lib/CssCrush/Process.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'enshrined\\svgSanitize\\Tests\\TestCase' not found in wp-content/plugins/css-magician/vendor/enshrined/svg-sanitize/tests/SubjectTest.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
  • Screenshots: Add an image for screenshot #2 (screenshot 2)
The official readme.txt might help

css-magician/css-magician.php Passed 13 tests

The entry point to "Css Magician Page Builder" version 1.0.1 is a PHP file that has certain tags in its header comment area
72 characters long description:
The ultimate page configurator, editor and builder. Basic Version (free)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin73,469 lines of code in 365 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1222,7976,90136,165
PHP1562,5792,32619,128
CSS2130920210,924
PO File11,2361,5703,768
Markdown3751701,442
JSON5001,115
SVG1668448
INI36881426
XML35040
YAML13013

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 195)
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity23.34
▷ Minimum class complexity1.00
▷ Maximum class complexity346.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity195.00
Code structure
Namespaces9
Interfaces2
Traits1
Classes55
▷ Abstract classes00.00%
▷ Concrete classes55100.00%
▷ Final classes00.00%
Methods443
▷ Static methods8719.64%
▷ Public methods39589.16%
▷ Protected methods4510.16%
▷ Private methods30.68%
Functions149
▷ Named functions9563.76%
▷ Anonymous functions5436.24%
Constants11
▷ Global constants763.64%
▷ Class constants436.36%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
138 compressed PNG files occupy 4.75MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/gallery/cache/background_11.png1.05KB0.75KB▼ 28.80%
assets/img/gallery/white-wall.png228.24KB239.34KB0.00%
assets/img/gallery/black-felt.png54.85KB56.71KB0.00%
assets/img/gallery/black-twill.png0.13KB0.17KB0.00%
assets/img/help/stylizer-element_en.png112.40KB117.84KB0.00%