78% serenity-theme-extensions

Code Review | Serenity Extensions

WordPress plugin Serenity Extensions scored 78% from 54 tests.

About plugin

  • Plugin page: serenity-theme-ex...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 6.3.1
  • First release: Mar 26, 2019
  • Latest release: Jul 27, 2022
  • Number of updates: 16
  • Update frequency: every 76.2 days
  • Top authors: themely (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 7,761 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.22ms] Passed 4 tests

This is a short check of server-side resources used by Serenity Extensions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.89 ▼11.17
Dashboard /wp-admin3.35 ▲0.0446.41 ▼2.83
Posts /wp-admin/edit.php3.46 ▲0.1045.85 ▼1.93
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.19 ▼8.63
Media Library /wp-admin/upload.php3.27 ▲0.0433.37 ▼2.23

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_serenity_service
theysaidso_admin_options
widget_serenity_testimonial
widget_theysaidso_widget
widget_serenity_team
widget_serenity_feature
can_compress_scripts

Browser metrics Passed 4 tests

Serenity Extensions: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.40 ▼0.961.75 ▲0.1039.91 ▼6.61
Dashboard /wp-admin2,223 ▲315.06 ▲0.12110.36 ▲5.7939.64 ▼0.83
Posts /wp-admin/edit.php2,111 ▲222.31 ▲0.3142.16 ▲5.8635.35 ▲1.26
Add New Post /wp-admin/post-new.php1,529 ▲1523.33 ▲5.65628.12 ▼10.3633.27 ▼29.89
Media Library /wp-admin/upload.php1,405 ▲174.51 ▲0.3097.35 ▲1.7141.82 ▲0.23

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_serenity_testimonial
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_serenity_team
    • widget_serenity_feature
    • widget_serenity_service
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/serenity-theme-extensions/serenity-extensions.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/serenity-theme-extensions/widgets/testimonial_widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/serenity-theme-extensions/widgets/team_widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/serenity-theme-extensions/widgets/showcase_widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/serenity-theme-extensions/widgets/service_widget.php:7
    • > PHP Warning
      require(SERENITY_EXTENSIONS_PATHwidgets/feature_widget.php): failed to open stream: No such file or directory in wp-content/plugins/serenity-theme-extensions/inc/widgets.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/serenity-theme-extensions/widgets/bar_widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/serenity-theme-extensions/widgets/feature_widget.php:7
    • > PHP Warning
      Use of undefined constant SERENITY_EXTENSIONS_PATH - assumed 'SERENITY_EXTENSIONS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/serenity-theme-extensions/inc/widgets.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/serenity-theme-extensions/widgets/project_widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/serenity-theme-extensions/widgets/counter_widget.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please add at least on tag
You can look at the official readme.txt

serenity-theme-extensions/serenity-extensions.php 92% from 13 tests

The main file in "Serenity Extensions" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 ("serenity-theme-extensions.php" instead of "serenity-extensions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,346 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP131444201,238
JavaScript1311277
CSS10031

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity12.10
▷ Minimum class complexity3.00
▷ Maximum class complexity28.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions323.08%
▷ Anonymous functions1076.92%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected