84% copito-comments

Code Review | Copito Comments

WordPress plugin Copito Comments scored84%from 54 tests.

About plugin

  • Plugin page: copito-comments
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 6.3.1
  • First release: May 2, 2018
  • Latest release: May 5, 2018
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: cosme12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.47ms] Passed 4 tests

This is a short check of server-side resources used by Copito Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.06 ▼5.15
Dashboard /wp-admin3.36 ▲0.0158.83 ▼14.45
Posts /wp-admin/edit.php3.47 ▲0.1151.72 ▼5.70
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.93 ▼16.59
Media Library /wp-admin/upload.php3.28 ▲0.0538.95 ▼1.98

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Copito Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.14 ▼0.251.59 ▼0.1240.26 ▼2.69
Dashboard /wp-admin2,208 ▲315.52 ▼0.0588.08 ▼15.9039.36 ▼6.45
Posts /wp-admin/edit.php2,116 ▲162.01 ▲0.0434.47 ▼4.5235.71 ▼1.98
Add New Post /wp-admin/post-new.php1,539 ▲1123.64 ▲0.36646.71 ▼34.5959.32 ▼0.08
Media Library /wp-admin/upload.php1,419 ▲224.15 ▼0.08101.22 ▲0.2447.28 ▲3.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/copito-comments/admin/partials/copito-comments-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: migrate, social media, facebook, tool, comments...

copito-comments/copito-comments.php Passed 13 tests

The primary PHP file in "Copito Comments" version 1.1.0 is used by WordPress to initiate all plugin functionality
105 characters long description:
Allows you to add comments manually. Useful to migrate comments from a Facebook Fan Page to your website.

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
Success! There were no dangerous files found in this plugin605 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10128472324
PO File27072225
CSS12438
JavaScript162918

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.83
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2586.21%
▷ Protected methods00.00%
▷ Private methods413.79%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/partials/copito-ad.png10.47KB3.96KB▼ 62.19%