68% press-release-services

Code Review | Press Release Services

WordPress plugin Press Release Services scored68%from 54 tests.

About plugin

  • Plugin page: press-release-ser...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-6.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2019
  • Latest release: Apr 7, 2023
  • Number of updates: 48
  • Update frequency: every 29.3 days
  • Top authors: lightimagemedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /743 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.94MB] [CPU: ▼39.40ms] Passed 4 tests

Analyzing server-side resources used by Press Release Services
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.78 ▲3.51
Dashboard /wp-admin3.01 ▼0.3329.93 ▼31.68
Posts /wp-admin/edit.php3.01 ▼0.3421.76 ▼29.82
Add New Post /wp-admin/post-new.php3.01 ▼2.8721.68 ▼82.24
Media Library /wp-admin/upload.php3.01 ▼0.2125.78 ▼13.86

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Press Release Services
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.51 ▼0.899.90 ▲8.2243.83 ▲0.50
Dashboard /wp-admin2,221 ▲505.65 ▲0.0795.52 ▲4.6841.66 ▼6.06
Posts /wp-admin/edit.php2,123 ▲232.00 ▼0.0234.68 ▼3.2733.92 ▼1.21
Add New Post /wp-admin/post-new.php1,546 ▲1823.80 ▲0.27689.43 ▲47.5055.10 ▼10.27
Media Library /wp-admin/upload.php1,426 ▲264.18 ▼0.02113.25 ▲18.0647.68 ▲2.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/press-release-services/inc/admin/class-admin.php+117
    Undefined variable: ajax_form_page_hook
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/press-release-services/inc/frontend/views/html-prwirepro-press-release-writer-frontend-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/press-release-services/inc/admin/views/partials-html-form-view.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: press release services, stock graphics, stock templates

press-release-services/press-release-services.php Passed 13 tests

The main file in "Press Release Services" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
88 characters long description:
Free stock press release graphics and templates and free press release services support.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin367 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP132,552521342
JavaScript2123625
CSS22100

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.24
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.63MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/assets/images/footer.png31.56KB8.95KB▼ 71.65%
inc/admin/assets/images/template003.png50.49KB31.66KB▼ 37.28%
inc/admin/assets/images/template001.png69.91KB36.42KB▼ 47.90%
inc/admin/assets/images/template002.png45.27KB22.55KB▼ 50.18%
inc/admin/assets/images/template004.png446.52KB177.59KB▼ 60.23%