78% advanced-twenty-seventeen

Code Review | Advanced Twenty Seventeen

WordPress plugin Advanced Twenty Seventeen scored78%from 54 tests.

About plugin

  • Plugin page: advanced-twenty-s...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 18, 2016
  • Latest release: Feb 27, 2017
  • Number of updates: 25
  • Update frequency: every 2.7 days
  • Top authors: saturnplugins (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

4,000+ active /42,750 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲3.34MB] [CPU: ▲10.51ms] Passed 4 tests

Analyzing server-side resources used by Advanced Twenty Seventeen
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /7.06 ▲3.6061.44 ▲17.34
Dashboard /wp-admin7.12 ▲3.8267.78 ▲14.94
Posts /wp-admin/edit.php7.12 ▲3.7759.97 ▲6.01
Add New Post /wp-admin/post-new.php8.07 ▲2.18100.24 ▲3.76
Media Library /wp-admin/upload.php7.12 ▲3.8959.08 ▲21.66

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Twenty Seventeen
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.25 ▼0.112.01 ▼3.6166.99 ▲19.52
Dashboard /wp-admin2,220 ▲435.56 ▲0.0191.66 ▲1.7939.54 ▼3.30
Posts /wp-admin/edit.php2,132 ▲322.02 ▲0.0736.49 ▼4.2434.38 ▼1.57
Add New Post /wp-admin/post-new.php1,561 ▲3518.06 ▼5.28695.11 ▲45.3264.51 ▲9.81
Media Library /wp-admin/upload.php1,431 ▲314.23 ▼0.0096.15 ▼10.3745.32 ▲0.79

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/dynamic-css.php
  • 57× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki_Field_Radio' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/field/class-kirki-field-radio-buttonset.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki_Field' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/field/class-kirki-field-code.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki_Output_Property' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/output/property/class-kirki-output-property-background-image.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki_Field_Select' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/field/class-kirki-field-select2-multiple.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki_Field' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/field/class-kirki-field-dimension.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Panel' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/panels/class-kirki-panels-expanded-panel.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/advanced-twenty-seventeen/inc/admin/child-theme/template-parts/footer/footer-widgets.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki_Field' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/field/class-kirki-field-upload.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki_Field' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/field/class-kirki-field-repeater.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki_Field_Radio' not found in wp-content/plugins/advanced-twenty-seventeen/inc/libraries/kirki/includes/field/class-kirki-field-radio-image.php:17

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 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === advanced-twenty-seventeen === )
You can look at the official readme.txt

advanced-twenty-seventeen/advanced-twenty-seventeen.php 92% from 13 tests

The main PHP file in "Advanced Twenty Seventeen" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin45,741 lines of code in 329 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1284,2303,84030,544
PHP1301,8205,3998,254
HTML2259622,449
CSS15265692,295
Sass3010132,032
SVG200139
Markdown15023
Bourne Shell1015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity8.75
▷ Minimum class complexity1.00
▷ Maximum class complexity95.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes117
▷ Abstract classes00.00%
▷ Concrete classes117100.00%
▷ Final classes65.13%
Methods382
▷ Static methods8020.94%
▷ Public methods20453.40%
▷ Protected methods15039.27%
▷ Private methods287.33%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.36MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/libraries/kirki/assets/images/1c.png0.74KB0.09KB▼ 87.24%
inc/libraries/kirki/assets/images/3cl.png0.77KB0.14KB▼ 81.42%
inc/libraries/kirki/assets/images/kirki-bottom.png1.51KB1.09KB▼ 27.89%
inc/admin/child-theme/screenshot.png355.31KB359.13KB0.00%
inc/libraries/kirki/assets/images/kirki-toolkit.png8.99KB5.49KB▼ 38.95%