94% functionality-for-shopera-theme

Code Review | Functionality for Shopera theme

WordPress plugin Functionality for Shopera theme scored 94% from 54 tests.

About plugin

  • Plugin page: functionality-for...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8
  • WordPress version: 5.9.2
  • First release: Aug 11, 2015
  • Latest release: Jun 5, 2017
  • Number of updates: 8
  • Update frequency: every 83.1 days
  • Top authors: Cohhe (75%)sprincis (37.5%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 21,724 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼289.85ms] Passed 4 tests

Server-side resources used by Functionality for Shopera theme
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1454.93 ▲2.10
Dashboard /wp-admin3.49 ▲0.0834.80 ▲0.85
Posts /wp-admin/edit.php3.72 ▲0.0839.49 ▲1.18
Add New Post /wp-admin/post-new.php6.96 ▼0.0194.67 ▼1,160.32
Media Library /wp-admin/upload.php3.37 ▲0.0724.79 ▼1.09

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Functionality for Shopera theme
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,908 ▲15416.67 ▲1.018.92 ▲2.882.41 ▼0.42
Dashboard /wp-admin2,896 ▲356.14 ▼0.06116.00 ▼21.06151.50 ▼10.59
Posts /wp-admin/edit.php2,692 ▲13.24 ▲0.0061.54 ▼5.23137.59 ▼6.68
Add New Post /wp-admin/post-new.php1,665 ▼8716.37 ▼4.58410.71 ▼24.94162.82 ▲6.17
Media Library /wp-admin/upload.php1,694 ▼75.55 ▲0.05134.69 ▼6.75181.92 ▼2.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/functionality-for-shopera-theme/public/partials/shopera-functionality-public-display.php
    • > /wp-content/plugins/functionality-for-shopera-theme/admin/partials/shopera-functionality-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: shopera, ecommerce

functionality-for-shopera-theme/functionality-for-shopera-theme.php 92% from 13 tests

"Functionality for Shopera theme" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected344 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12148544338
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected