94% social-cinema

Code Review | Social Cinema

WordPress plugin Social Cinema scored 94% from 54 tests.

About plugin

  • Plugin page: social-cinema
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 5.8.1
  • First release: Oct 7, 2016
  • Latest release: Oct 7, 2016
  • Number of updates: 2
  • Update frequency: every 45.5 days
  • Top authors: pgogy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,690 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼136.66ms] Passed 4 tests

Server-side resources used by Social Cinema
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.02 ▲0.2938.17 ▲16.11
Dashboard /wp-admin3.31 ▲0.2548.99 ▲6.67
Posts /wp-admin/edit.php3.36 ▲0.2548.34 ▲4.62
Add New Post /wp-admin/post-new.php5.61 ▲0.1796.31 ▼561.08
Media Library /wp-admin/upload.php3.19 ▲0.1939.70 ▲3.17
Cache Settings /wp-admin/admin.php?page=social-cinema-cache3.1630.64
Social Cinema /wp-admin/admin.php?page=social-cinema-settings3.1733.06
Purge Cache /wp-admin/admin.php?page=social-cinema-cache-purge3.1632.97

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 158 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Social Cinema
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,744 ▲14816.20 ▲0.6811.05 ▲2.5953.95 ▲1.30
Dashboard /wp-admin3,006 ▲695.91 ▼0.11144.58 ▼18.05122.29 ▲6.10
Posts /wp-admin/edit.php2,778 ▲392.68 ▲0.0068.93 ▲0.6797.10 ▲2.95
Add New Post /wp-admin/post-new.php1,525 ▼9018.51 ▼2.93366.65 ▲91.46115.87 ▲5.12
Media Library /wp-admin/upload.php1,846 ▲365.06 ▲0.06162.51 ▲13.48126.39 ▲1.24
Cache Settings /wp-admin/admin.php?page=social-cinema-cache1,0912.0962.1076.86
Social Cinema /wp-admin/admin.php?page=social-cinema-settings1,3792.0962.7280.34
Purge Cache /wp-admin/admin.php?page=social-cinema-cache-purge1,0332.0857.7168.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller 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
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 80× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/Coordinate.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/Drive.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/Blogger.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/Appsactivity.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/YouTubeAnalytics.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/Autoscaler.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/AdExchangeSeller.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/Reseller.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Vimeo\\Exceptions\\ExceptionInterface' not found in wp-content/plugins/social-cinema/code/lib/src/Vimeo/Exceptions/VimeoUploadException.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/social-cinema/code/lib/Google/src/Google/Service/Groupssettings.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === social-cinema === )
You can take inspiration from this readme.txt

social-cinema/social-cinema.php Passed 13 tests

"Social Cinema" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Displays a selection of youtube videos in a variety of layouts

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
Success! There were no dangerous files found in this plugin154,474 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
PHP14710,47429,386154,165
JavaScript3420155
XML1284188
CSS16037
JSON20029

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.02
Average class complexity1.28
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity1.04
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces2
Traits0
Classes2,772
▷ Abstract classes60.22%
▷ Concrete classes2,76699.78%
▷ Final classes00.00%
Methods21,886
▷ Static methods140.06%
▷ Public methods21,81799.68%
▷ Protected methods300.14%
▷ Private methods390.18%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants239
▷ Global constants00.00%
▷ Class constants239100.00%
▷ Public constants239100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin