79% onestore-sites

Code Review | OneStore Sites

WordPress plugin OneStore Sites scored79%from 54 tests.

About plugin

  • Plugin page: onestore-sites
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.5-5.7
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Mar 12, 2021
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: sainwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,274 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.97MB] [CPU: ▼1.32ms] Passed 4 tests

Analyzing server-side resources used by OneStore Sites
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.48 ▲0.9851.79 ▲6.02
Dashboard /wp-admin4.33 ▲0.9454.54 ▼6.78
Posts /wp-admin/edit.php4.44 ▲1.0454.06 ▼0.95
Add New Post /wp-admin/post-new.php6.91 ▲0.9899.53 ▼3.57
Media Library /wp-admin/upload.php4.25 ▲0.9847.52 ▲9.74
OneStore Sites /wp-admin/themes.php?page=onestore-sites4.2745.28

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for OneStore Sites
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4714.17 ▼0.182.06 ▲0.0544.06 ▲4.15
Dashboard /wp-admin2,199 ▲225.58 ▼0.0894.29 ▲6.9941.86 ▲2.58
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0239.30 ▲1.5134.98 ▼1.25
Add New Post /wp-admin/post-new.php1,529 ▲123.13 ▼0.12680.15 ▲62.4853.84 ▲0.57
Media Library /wp-admin/upload.php1,401 ▲44.13 ▼0.03109.06 ▲6.2146.96 ▼5.77
OneStore Sites /wp-admin/themes.php?page=onestore-sites9392.0630.4639.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'OneStore_Sites_Importer_Logger' not found in wp-content/plugins/onestore-sites/importer/class-logger-serversentevents.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/onestore-sites/onestore-sites.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/onestore-sites/templates/dashboard.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/onestore-sites/classess/class-tgm.php:2100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/onestore-sites/templates/preview.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Importer' not found in wp-content/plugins/onestore-sites/importer/class-wxr-importer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/onestore-sites/templates/modal.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/onestore-sites/classess/class-export.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TGM_Plugin_Activation' not found in wp-content/plugins/onestore-sites/classess/class-plugin.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/themes.php?page=onestore-sites
    • > Network (severe)
    https://sainwp.com/wp-json/wp/v2/sites/?cat=&tag=&builder=all&s=&license_key=&_t=1697546145520 - Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: one click import, theme demos, demo

onestore-sites/onestore-sites.php Passed 13 tests

"OneStore Sites" version 0.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
44 characters long description:
Import free sites build with OneStore theme.

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
No dangerous file extensions were detected10,225 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP151,2912,6915,132
JavaScript36079982,651
CSS754541,105
Sass2614822
SVG6123515

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity54.82
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods249
▷ Static methods124.82%
▷ Public methods18373.49%
▷ Protected methods6224.90%
▷ Private methods41.61%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/placeholder/placeholder.png44.37KB6.89KB▼ 84.46%