84% wpswlr

Code Review | WPSwlr

WordPress plugin WPSwlr scored 84% from 54 tests.

About plugin

  • Plugin page: wpswlr
  • Plugin version: 1.2.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Oct 26, 2021
  • Latest release: Apr 2, 2023
  • Number of updates: 19
  • Update frequency: every 27.5 days
  • Top authors: bttrs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 517 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▲1.12ms] Passed 4 tests

This is a short check of server-side resources used by WPSwlr
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2040.54 ▲1.92
Dashboard /wp-admin3.49 ▲0.1946.13 ▼3.79
Posts /wp-admin/edit.php3.54 ▲0.1951.14 ▲3.76
Add New Post /wp-admin/post-new.php6.31 ▲0.43101.96 ▲2.59
Media Library /wp-admin/upload.php3.35 ▲0.1237.40 ▲4.27
All Facebook Posts /wp-admin/edit.php?post_type=wpswlr-facebook-post3.4744.68
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=wpswlr-facebook-post3.3438.28

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 120 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
category_children
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WPSwlr
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10413.30 ▼1.081.65 ▼0.1443.43 ▲2.69
Dashboard /wp-admin2,245 ▲534.88 ▼0.05105.70 ▼2.9767.46 ▲21.55
Posts /wp-admin/edit.php2,134 ▲452.01 ▲0.0137.59 ▲2.8534.58 ▼0.92
Add New Post /wp-admin/post-new.php1,566 ▲3018.27 ▼4.97733.62 ▲93.7272.38 ▲21.93
Media Library /wp-admin/upload.php1,430 ▲424.16 ▼0.0994.52 ▼4.2845.47 ▲0.74
All Facebook Posts /wp-admin/edit.php?post_type=wpswlr-facebook-post1,1242.0633.0530.50
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=wpswlr-facebook-post1,4852.1525.9636.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • category_children
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPSWLR\\Facebook\\PostTypes\\FacebookPostTemplate' not found in wp-content/plugins/wpswlr/src/Facebook/PostTypes/FacebookPostTemplateGeneral.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPSWLR\\Facebook\\PostTypes\\FacebookPostTemplate' not found in wp-content/plugins/wpswlr/src/Facebook/PostTypes/FacebookPostTemplateAlbum.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSWLR\\Facebook\\Loaders\\FacebookLoader' not found in wp-content/plugins/wpswlr/src/Facebook/Loaders/PostsLoader.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPSWLR\\Facebook\\PostTypes\\FacebookPostTemplate' not found in wp-content/plugins/wpswlr/src/Facebook/PostTypes/FacebookPostTemplateVideo.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPSWLR\\Facebook\\Exceptions\\FacebookException' not found in wp-content/plugins/wpswlr/src/Facebook/Exceptions/FacebookClientException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSWLR\\Facebook\\Loaders\\FacebookLoader' not found in wp-content/plugins/wpswlr/src/Facebook/Loaders/InfoLoader.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPSWLR\\Core\\Settings\\AbstractSettings' not found in wp-content/plugins/wpswlr/src/Core/Settings/FacebookOptions.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSWLR\\Core\\InitListener' not found in wp-content/plugins/wpswlr/src/Facebook/Services/FacebookLoaderService.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSWLR\\Core\\InitListener' not found in wp-content/plugins/wpswlr/src/Admin/PluginSettings.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPSWLR\\Core\\Settings\\AbstractSettings' not found in wp-content/plugins/wpswlr/src/Core/Settings/FacebookInfo.php:13

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: integration, feed, posts, facebook

wpswlr/wpswlr.php Passed 13 tests

The main file in "WPSwlr" v. 1.2.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
81 characters long description:
Load posts from your Facebook Page feed to the WordPress website in a simple way.

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
Everything looks great! No dangerous files found in this plugin5,659 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
PHP496381,1533,205
TypeScript31156121,740
Sass7444314
JavaScript4836186
CSS4151289
JSON40078
SVG10047

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity9.80
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces13
Interfaces5
Traits0
Classes36
▷ Abstract classes25.56%
▷ Concrete classes3494.44%
▷ Final classes00.00%
Methods236
▷ Static methods4519.07%
▷ Public methods19281.36%
▷ Protected methods156.36%
▷ Private methods2912.29%
Functions20
▷ Named functions525.00%
▷ Anonymous functions1575.00%
Constants40
▷ Global constants512.50%
▷ Class constants3587.50%
▷ Public constants35100.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
14 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src-ui/public/logo-96.png3.91KB2.28KB▼ 41.58%
src-ui/public/logo-128.png5.38KB2.88KB▼ 46.51%
assets/admin/logo-196.png8.44KB3.97KB▼ 53.00%
assets/admin/logo-32.png1.31KB0.93KB▼ 29.25%
assets/admin/logo-16.png0.69KB0.51KB▼ 26.21%