84% photography-core

Code Review | Photography Core

WordPress plugin Photography Core scored 84% from 54 tests.

About plugin

  • Plugin page: photography-core
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Jun 20, 2019
  • Number of updates: 30
  • Update frequency: every 20.3 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,857 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.56ms] Passed 4 tests

This is a short check of server-side resources used by Photography Core
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.02 ▲0.28
Dashboard /wp-admin3.38 ▲0.0847.26 ▲0.73
Posts /wp-admin/edit.php3.49 ▲0.1443.19 ▼4.69
Add New Post /wp-admin/post-new.php6.10 ▲0.2186.52 ▼2.55
Media Library /wp-admin/upload.php3.30 ▲0.0840.96 ▲5.76
Keywords /wp-admin/edit-tags.php?taxonomy=attachment_keyword&post_type=attachment3.3034.03
Folders /wp-admin/edit-tags.php?taxonomy=meow_folder&post_type=meow_collection3.3341.91
Add New /wp-admin/post-new.php?post_type=meow_collection6.1084.14
All Collections /wp-admin/edit.php?post_type=meow_collection3.3536.99

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Photography Core
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲14214.48 ▲0.181.84 ▼0.0339.99 ▼4.23
Dashboard /wp-admin2,241 ▲505.80 ▲0.95113.05 ▲8.1742.15 ▲2.14
Posts /wp-admin/edit.php2,124 ▲351.98 ▼0.0637.15 ▲2.3033.12 ▲1.26
Add New Post /wp-admin/post-new.php6,633 ▲5,11922.34 ▲4.72934.74 ▲239.2239.72 ▼14.47
Media Library /wp-admin/upload.php1,414 ▲264.19 ▼0.0695.87 ▼2.2444.05 ▲0.10
Keywords /wp-admin/edit-tags.php?taxonomy=attachment_keyword&post_type=attachment1,2962.1429.7128.15
Folders /wp-admin/edit-tags.php?taxonomy=meow_folder&post_type=meow_collection1,5543.1842.7126.67
Add New /wp-admin/post-new.php?post_type=meow_collection1,54616.85821.7132.25
All Collections /wp-admin/edit.php?post_type=meow_collection1,1471.9330.5430.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/photography-core/api.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/photography-core/folders-order.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
9 plugin tags: retina, photography, responsive, photo, gallery...

photography-core/photography-core.php Passed 13 tests

This is the main PHP file of "Photography Core" version 0.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
132 characters long description:
Photography Core is the heart of the themes made for photographers. Features are the API, helpers, Gutenberg blocks, Lightroom, etc.

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
Good job! No executable or dangerous file extensions detected1,788 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP9149120900
CSS10630498
JavaScript7351340
Sass611450

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.33
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods64
▷ Static methods00.00%
▷ Public methods6195.31%
▷ Protected methods11.56%
▷ Private methods23.12%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/meowapps.png3.54KB3.59KB0.00%